View previous topic :: View next topic |
Author |
Message |
mno Guru
Joined: 29 Dec 2003 Posts: 454 Location: Toronto, Canada
|
Posted: Sat Aug 11, 2018 3:41 pm Post subject: updating all packages to latest python (3.5->3.6) |
|
|
Hi all,
While I moved to python 3.6 a while back, I recently noticed that 3.5 wasn't removed. Doing a --depclean on it revealed a few packages that still depend on it:
Code: | lastochka ~ # emerge --depclean -av python:3.5
Calculating dependencies... done!
dev-lang/python-3.5.4-r1 pulled in by:
dev-python/appdirs-1.4.3 requires dev-lang/python:3.5
dev-python/packaging-16.8 requires dev-lang/python:3.5
dev-python/pyparsing-2.2.0 requires dev-lang/python:3.5
dev-python/six-1.10.0 requires dev-lang/python:3.5 |
What is the best way to do a one-off rebuild of all packages depending on 3.5?
For now, I simply did a
Code: | lastochka ~ # emerge -av dev-python/six dev-python/pyparsing dev-python/packaging dev-python/appdirs |
and it seems to be working. _________________ "Hello and goodbye. As always." | You can't use here?? | Unanswered |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sat Aug 11, 2018 3:44 pm Post subject: |
|
|
your lack of --oneshot will hit you soon, as portage will try its best now to always keep them. |
|
Back to top |
|
|
mno Guru
Joined: 29 Dec 2003 Posts: 454 Location: Toronto, Canada
|
Posted: Sat Aug 11, 2018 3:46 pm Post subject: |
|
|
Thanks @krinn,
Yup seeing it now. In fact, all 4 of those packages weren't required by anything so I could simply just --depclean them. Must have been pulled in a while ago (old box).
Regardless, what's the best way to rebuild python packages after upgrade? _________________ "Hello and goodbye. As always." | You can't use here?? | Unanswered |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sat Aug 11, 2018 3:54 pm Post subject: |
|
|
it's -U
to more elaboarte on the logic behind is : if a package was built with python_27 and now you use python_35, the package use flags will be change to python_27 +python_35 and so catch by -U work.
But it will happen only if your PYTHON_TARGETS has change (it may not change if you fix it in your make.conf or profile didn't change it) and if the package can handle that new PYTHON_TARGETS (won't show up if the package cannot work iwth that python version)
so, -U will catch python packages that have their useflags change because of PYTHON_TARGETS change.
Last edited by krinn on Sat Aug 11, 2018 4:01 pm; edited 1 time in total |
|
Back to top |
|
|
mno Guru
Joined: 29 Dec 2003 Posts: 454 Location: Toronto, Canada
|
Posted: Sat Aug 11, 2018 3:55 pm Post subject: |
|
|
Veering a tad off-topic, I typically run:
Code: | emerge -uNDav @world |
Clearly I'm missing something, and should be running
Code: | emerge -UNDav @world |
? _________________ "Hello and goodbye. As always." | You can't use here?? | Unanswered |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54232 Location: 56N 3W
|
Posted: Sat Aug 11, 2018 3:55 pm Post subject: |
|
|
mno,
There used to be python-updater but as you just demonstrated, no special treatment is required.
Had you done the normal world update followed by --depclean at your last update, those orphans would have been removed then.
-- edit --
The subsequent world update would have rebuild everything with python-3.6 and removed python-3.5 in the process. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Sat Aug 11, 2018 4:00 pm Post subject: |
|
|
you can always depclean them (if they are really required the process will balk) _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21619
|
Posted: Sat Aug 11, 2018 4:00 pm Post subject: |
|
|
If they are reachable from @world, emerge --update --deep --newuse should handle rebuilding them with the new PYTHON_TARGETS value. If, as here, they are unused, then emerge --ask --depclean will remove them, at which point you do not need to update them. |
|
Back to top |
|
|
mno Guru
Joined: 29 Dec 2003 Posts: 454 Location: Toronto, Canada
|
Posted: Sat Aug 11, 2018 4:03 pm Post subject: |
|
|
Thanks guys! I guess I missed a --depclean before... _________________ "Hello and goodbye. As always." | You can't use here?? | Unanswered |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sat Aug 11, 2018 4:05 pm Post subject: |
|
|
Hu: i think --update is only taking packages with a newer version in the tree, all existing python packages that have no update but still need rebuild because of the python change will not get caught ; -U does better for python upgrade. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21619
|
Posted: Sat Aug 11, 2018 5:24 pm Post subject: |
|
|
--newuse, shortcut -N, is an older and more aggressive cousin to -U, long form --changed-use. From some quick experiments here, and based on my reading of the documentation, that should include packages even when no new version is available, if the active USE flags changed. If so, then either -U or --newuse should work here. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sat Aug 11, 2018 9:00 pm Post subject: |
|
|
i have tried, --update doesn't prevent the package from been pull in the graph ; making --newuse working fine then. |
|
Back to top |
|
|
|