Gentoo Archives: gentoo-user

From: Laurence Perkins <lperkins@×××××××.net>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: RE: [gentoo-user] python, my nemesis
Date: Mon, 20 Sep 2021 15:47:18
Message-Id: MW2PR07MB40581E235AADE6DA215AE358D2A09@MW2PR07MB4058.namprd07.prod.outlook.com
In Reply to: Re: [gentoo-user] python, my nemesis by Neil Bothwick
1 -----Original Message-----
2 From: Neil Bothwick <neil@××××××××××.uk>
3 Sent: Monday, September 20, 2021 8:17 AM
4 To: gentoo-user@l.g.o
5 Subject: Re: [gentoo-user] python, my nemesis
6
7 On Mon, 20 Sep 2021 15:56:46 +0200, Gerrit Kuehn wrote:
8
9 >> > > ~ # cat /etc/portage/package.use/py
10 >> > > */* PYTHON_TARGETS: -* python3_9 python3_8
11 >> > > */* PYTHON_SINGLE_TARGET: -* python3_9
12 >> > > ---
13 >>
14 >> > You should probably not mess with these variables until after your
15 >> > system is 100% updated and consistent. And even then, probably not.
16 >> >
17 >> > With our package manager written in python, you often need old
18 >> > python stuff to build the new python stuff, and disabling the old
19 >> > python stuff will throw a wrench into that. Even in situations where
20 >> > technically some upgrade path exists, the complexity of the python
21 >> > dependencies often means that the package manager will give up
22 >> > before it finds the solution unless the solution is obvious. By
23 >> > tweaking those variables, you make the solution less obvious to it.
24 >>
25 >> Well, this was the suggested way to go, see
26 >> https://www.gentoo.org/support/news-items/2021-05-05-python3-9.html
27 >
28 >That news item is about going from 3.8 to 3.9, you are on 3.7. I'd try removing the -* items are trying again.
29 >
30 >
31 When upgrading really old systems I find it useful to run:
32 export PYTHON_TARGETS="$(eix -I | grep -o "python[23]_[0-9]*" | sort -u)"
33
34 This will temporarily set the system (for the duration of the current session) to build for every version of python that is either available for new builds or currently in use. The dependency resolver seems to have an easier time finding a path when it doesn't think it has to throw away all the currently installed stuff first.
35
36 Note that this will end up rebuilding a lot more than is technically necessary, and then you'll need to rebuild again with the python versions you actually want and depclean the extras. Personally though I rather prefer to have the computer do more work instead of spending hours using *my* brain to find the minimum sized rebuild set to upgrade the system.
37
38 LMP