Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 494918 - dev-lang/python: Force eselect python update on upgrades
Summary: dev-lang/python: Force eselect python update on upgrades
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-21 03:03 UTC by Rick Farina (Zero_Chaos)
Modified: 2018-04-21 21:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Add ESELECT_PYTHON_UPDATE_FORCE variable (eselect-python-force.patch,1.26 KB, patch)
2013-12-21 04:19 UTC, Mike Gilbert
Details | Diff
Cleanup eselect_python_update function (eselect-python-cleanup.patch,1.68 KB, patch)
2013-12-21 04:23 UTC, Mike Gilbert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Farina (Zero_Chaos) gentoo-dev 2013-12-21 03:03:45 UTC
It would be awesome if there was a way to have python update automatically update my eselect target for me.  Obvious it shouldn't change the default interpreter but if 2.x updates we could update --python2 and 3.x could update --python3.

Mostly this is an issue for those of us who update from a completely unattended script.  With the new python-r1 eclasses becoming widely used I think it is pretty safe to do this by default, but I'd be happy with a use flag or a magic envvar or w/e the python team feels fit to provide.
Comment 1 Mike Gilbert gentoo-dev 2013-12-21 04:19:39 UTC
Created attachment 365792 [details, diff]
Add ESELECT_PYTHON_UPDATE_FORCE variable
Comment 2 Mike Gilbert gentoo-dev 2013-12-21 04:23:52 UTC
Created attachment 365794 [details, diff]
Cleanup eselect_python_update function

The first patch is pretty safe. Let me know if that works for you. Did you want this on the stable ebuilds as well, or does ~arch suffice?

Also, I would like to apply this second cleanup patch, but it is a little risky. If you could do me a favor and run it through a stage1 build when you have some time that would be most appreciated.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-12-21 08:41:16 UTC
Optionally, we could use PYTHON_TARGETS to do extra safety check before switching. That is, switch only if user has appropriate target enabled.
Comment 4 Mike Gilbert gentoo-dev 2013-12-21 13:54:28 UTC
(In reply to Michał Górny from comment #3)

Any details on how you would implement that? Adding python_targets to IUSE on dev-lang/python is a bit awkward.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-21 21:46:07 UTC
We no longer really want to use eselect-python automatically.