Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed handling of Python 2.7 USE flag in app-vim/powerline-vim. #97

Closed
wants to merge 1 commit into from

Conversation

Ferroin
Copy link

@Ferroin Ferroin commented May 11, 2021

We should only be checking for python_targets_python2_7 being set if it actually exists in $IUSE. This updates the check to only happen if the flag exists, and if it doesn’t to behave as if it’s unset.

Checking unconditionally results in build failures like the following on an up-to-date ~amd64 system:

 * Package:    app-vim/powerline-vim-2.7
 * Repository: raiagent
 * Maintainer: [email protected]
 * Upstream:   https://github.com/powerline/powerline/issues
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_8 python_targets_python3_9 userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox splitdebug userpriv usersandbox
>>> Unpacking source...
>>> Unpacking powerline-status-2.7.tar.gz to /var/tmp/portage/app-vim/powerline-vim-2.7/work
>>> Source unpacked in /var/tmp/portage/app-vim/powerline-vim-2.7/work
>>> Preparing source in /var/tmp/portage/app-vim/powerline-vim-2.7/work/powerline-status-2.7 ...
 * ERROR: app-vim/powerline-vim-2.7::raiagent failed (prepare phase):
 *   USE Flag 'python_targets_python2_7' not in IUSE for app-vim/powerline-vim-2.7
 * 
 * Call stack:
 *          ebuild.sh, line  125:  Called src_prepare
 *        environment, line 2243:  Called use 'python_targets_python2_7'
 *   phase-helpers.sh, line  246:  Called die
 * The specific snippet of code:
 *   				die "USE Flag '${u}' not in IUSE for ${CATEGORY}/${PF}"
 * 
 * If you need support, post the output of `emerge --info '=app-vim/powerline-vim-2.7::raiagent'`,
 * the complete build log and the output of `emerge -pqv '=app-vim/powerline-vim-2.7::raiagent'`.
 * The complete build log is located at '/var/tmp/portage/app-vim/powerline-vim-2.7/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-vim/powerline-vim-2.7/temp/environment'.
 * Working directory: '/var/tmp/portage/app-vim/powerline-vim-2.7/work/powerline-status-2.7'
 * S: '/var/tmp/portage/app-vim/powerline-vim-2.7/work/powerline-status-2.7'

We should only be checking for `python_targets_python2_7` being set if
it actually eists in `$IUSE`, which will not be the case on recent
Gentoo systems.
@leycec
Copy link
Owner

leycec commented May 11, 2021

OMG. Thanks so much for this timely contribution, Austin! I feel just awful, though... I independently resolved that just this morning at exactly the same time as you did, after I noticed breakage during a @world update.

Ugh. I'm so painfully sorry about that. Had I checked GitHub first, I would've happily merged yours first. </sigh>

My solution was a bit more heavy-handed, too. Since Python 2.7 hit its End-of-Life (EOL) a few years ago and is now a security risk waiting to explode on everyone's backend server, I just removed all reference to Python 2.7 entirely. Problem solved.

Relatedly, upstream Powerline has since released a few new versions. It'd be great if we could bump our ebuilds to support those, but... I don't use Powerline quite as much as I used to. It's hard to find that plucky volunteer enthusiasm on these rainy Spring days. ☔ 🌧️ 🌦️

Have a great day and thanks again for the excellent PR, @Ferroin.

@leycec leycec closed this May 11, 2021
@Ferroin
Copy link
Author

Ferroin commented May 12, 2021

OMG. Thanks so much for this timely contribution, Austin! I feel just awful, though... I independently resolved that just this morning at exactly the same time as you did, after I noticed breakage during a @world update.

Ugh. I'm so painfully sorry about that. Had I checked GitHub first, I would've happily merged yours first. </sigh>

That’s OK, I’ve been on the other side of this type of thing numerous times myself so I entirely understand.

My solution was a bit more heavy-handed, too. Since Python 2.7 hit its End-of-Life (EOL) a few years ago and is now a security risk waiting to explode on everyone's backend server, I just removed all reference to Python 2.7 entirely. Problem solved.

I’d actually argue that that’s a better solution, I was just being conservative in this case because I did not know if all the major Gentoo derivatives had also taken the same stance as Gentoo WRT Python 2.7 or not.

Relatedly, upstream Powerline has since released a few new versions. It'd be great if we could bump our ebuilds to support those, but... I don't use Powerline quite as much as I used to. It's hard to find that plucky volunteer enthusiasm on these rainy Spring days.

Assuming I can find the time I will probably pick that up, at least to get things up to date (looks like 2.8.2 is the newest right now). I use Powerline enough to care about this, but may not be able to commit long term to helping maintain it.

@Ferroin Ferroin deleted the powerline-vim-fix branch May 12, 2021 11:10
@leycec
Copy link
Owner

leycec commented May 13, 2021

Assuming I can find the time I will probably pick that up, at least to get things up to date (looks like 2.8.2 is the newest right now). I use Powerline enough to care about this...

That would be phenomenal, actually! We'd all be incredibly appreciative for that. Since official Gentoo developers have yet to express any interest in packaging Powerline in Portage, I'm afraid we're it for the foreseeable future.

Go, Team Raiagent. Go. 🚤

...but may not be able to commit long term to helping maintain it.

I feel you on that one. Whenever I upstream ebuilds to the ::science overlay, their first response is always:

"So... let's just make you the permanent long-term proxy maintainer for this package then, shall we?"

To which I always give the same canned reply:

"I would rather be dragged screaming behind a mutant turkey during mating season."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants