When eselect python cleanup is invoked, it does only clean one stale implementation per invocation. Example: # eselect python list Available Python interpreters, in order of preference: [1] python2.7 [2] python3.5 (uninstalled) [3] python3.4 (uninstalled) [4] python3.6 (fallback) # eselect python cleanup # eselect python list Available Python interpreters, in order of preference: [1] python3.6 [2] python2.7 [3] python3.4 (uninstalled) # eselect python cleanup # eselect python list Available Python interpreters, in order of preference: [1] python3.6 [2] python2.7
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/eselect-python.git/commit/?id=cb7db35b2863967c327d76b1f8ec4dc77493ed7b commit cb7db35b2863967c327d76b1f8ec4dc77493ed7b Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2019-04-17 10:46:33 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2019-04-17 10:47:11 +0000 Fix mismatched indexes when looping over old impls Bug: https://bugs.gentoo.org/683178 Signed-off-by: Michał Górny <mgorny@gentoo.org> python.eselect.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
Ok, apparently bash is very silly at removing array elements, and once you start doing that, the element indexes remain the same even though list length shrinks. Should be fixed now. Could test 9999* and confirm?
The live ebuild fixed the issue for me. (found a backup of a VM that still contains the old versions...)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79962c3e77dc69df227ba4a25779911b8846d4b7 commit 79962c3e77dc69df227ba4a25779911b8846d4b7 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2019-04-17 12:27:31 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2019-04-17 12:27:47 +0000 app-eselect/eselect-python: Bump to 20190417 Closes: https://bugs.gentoo.org/683178 Signed-off-by: Michał Górny <mgorny@gentoo.org> app-eselect/eselect-python/Manifest | 1 + .../eselect-python/eselect-python-20190417.ebuild | 40 ++++++++++++++++++++++ 2 files changed, 41 insertions(+)