-----Original Message-----
From: Neil Bothwick <[email protected]>
Sent: Monday, September 20, 2021 8:17 AM
To: [email protected]
Subject: Re: [gentoo-user] python, my nemesis
On Mon, 20 Sep 2021 15:56:46 +0200, Gerrit Kuehn wrote:
>> > > ~ # cat /etc/portage/package.use/py
>> > > */* PYTHON_TARGETS: -* python3_9 python3_8
>> > > */* PYTHON_SINGLE_TARGET: -* python3_9
>> > > ---
>>
>> > You should probably not mess with these variables until after your
>> > system is 100% updated and consistent. And even then, probably not.
>> >
>> > With our package manager written in python, you often need old
>> > python stuff to build the new python stuff, and disabling the old
>> > python stuff will throw a wrench into that. Even in situations where
>> > technically some upgrade path exists, the complexity of the python
>> > dependencies often means that the package manager will give up
>> > before it finds the solution unless the solution is obvious. By
>> > tweaking those variables, you make the solution less obvious to it.
>>
>> Well, this was the suggested way to go, see
>> https://www.gentoo.org/support/news-items/2021-05-05-python3-9.html
>
>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.
>
>
When upgrading really old systems I find it useful to run:
export PYTHON_TARGETS="$(eix -I | grep -o "python[23]_[0-9]*" | sort -u)"
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.
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.
LMP