Source: python2.7 Version: 2.7.18-1 Severity: serious Tags: patch Hi,
while analyzing piuparts buster->bullseye tests, I found some cases where the Python 2 stack was not completely upgraded (some packages were kept at the buster version even if a newer version was available in bullseye). This happened because apt tried to keep some of the unversioned python packages installed. I've tried adding some Breaks and the attached patch fixed all of the previously incomplete upgrades I tested. I'm adding Breaks against python-minimal (<< 2.7.18) and libpython-stdlib (<< 2.7.18), which are at the bottom of the unversioned python stack. The version is chosen such that unversioned packages based on the current version could still be built and installed locally ... (Just after upgrading a clean buster system to bullseye the unversioned python should be gone.) I'm adding these Breaks to libpython2.7-minimal because it is the bottom of the python2.7 stack still available in bullseye. (And I assume that won't go away.) I'm also adding these same Breaks to python2.7 which gets a higher score by apt and therefore the removal of cruft packages more easily wins over their preservation. I'm attaching upgrade logs (with apt debug output if someone is interested in scores and preoblem resolution) from ceph-common which is one example affected by this. Here are some excepts: Summary: apt tries to keep the cruft libpython-stdlib and python-minimal packages installed and therefore cannot upgrade some python2 packages. Reference: some relevant apt scores: 14 python2.7:amd64 < 2.7.16-2+deb10u1 -> 2.7.18-1 @ii umU > 10 libpython2.7-minimal:amd64 < 2.7.16-2+deb10u1 -> 2.7.18-1 @ii umU > 9 python2:amd64 < 2.7.16-1 -> 2.7.18-2 @ii umU > 7 python:amd64 < 2.7.16-1 @ii mK Ib > 6 libpython-stdlib:amd64 < 2.7.16-1 @ii mK Ib > 6 python-minimal:amd64 < 2.7.16-1 @ii mK Ib > 2 python2-minimal:amd64 < 2.7.16-1 -> 2.7.18-2 @ii umU > 2 libpython2-stdlib:amd64 < 2.7.16-1 -> 2.7.18-2 @ii umU > The following packages will be REMOVED: python python-cephfs python-certifi python-chardet python-idna python-prettytable python-rados python-rbd python-requests python-urllib3 The following NEW packages will be installed: [...] * The following packages have been kept back: *** * libpython2-stdlib python2 python2-minimal *** The following packages will be upgraded: [...] 125 upgraded, 51 newly installed, 10 to remove and 3 not upgraded. With this change applied: some relevant apt scores: 14 python2.7:amd64 < 2.7.16-2+deb10u1 -> 2.7.18-5.1 @ii umU Ib > 14 libpython2.7-stdlib:amd64 < 2.7.16-2+deb10u1 -> 2.7.18-5.1 @ii umU > 9 python2:amd64 < 2.7.16-1 -> 2.7.18-2 @ii umU > 7 python:amd64 < 2.7.16-1 @ii mK Ib > 4 python-minimal:amd64 < 2.7.16-1 @ii mK Ib > 4 libpython-stdlib:amd64 < 2.7.16-1 @ii mK Ib > 2 libpython2-stdlib:amd64 < 2.7.16-1 -> 2.7.18-2 @ii umU > 2 python2-minimal:amd64 < 2.7.16-1 -> 2.7.18-2 @ii umU > The following packages will be REMOVED: libpython-stdlib python python-cephfs python-certifi python-chardet python-idna python-minimal python-prettytable python-rados python-rbd python-requests python-urllib3 The following NEW packages will be installed: [...] The following packages will be upgraded: [...] 129 upgraded, 51 newly installed, 12 to remove and 0 not upgraded. Andreas
diff -u python2.7-2.7.18/debian/changelog python2.7-2.7.18/debian/changelog --- python2.7-2.7.18/debian/changelog +++ python2.7-2.7.18/debian/changelog @@ -1,3 +1,12 @@ +python2.7 (2.7.18-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * python2.7, libpython2.7-minimal: Add Breaks: python-minimal (<< 2.7.18), + libpython-stdlib (<< 2.7.18) to ensure removal of the unversioned python + packages on upgrades from buster. Closes: #xxxxxx. + + -- Andreas Beckmann <a...@debian.org> Fri, 05 Mar 2021 22:03:36 +0100 + python2.7 (2.7.18-5) unstable; urgency=medium * Use the posix_prefix layout when inside a virtualenv (Stefano Rivera). diff -u python2.7-2.7.18/debian/control python2.7-2.7.18/debian/control --- python2.7-2.7.18/debian/control +++ python2.7-2.7.18/debian/control @@ -34,6 +34,7 @@ Suggests: python2.7-doc, binutils Conflicts: python-profiler (<= 2.7.1-2) Breaks: python-virtualenv (<< 1.7.1.2-2~), vim-nox (<< 2:7.3.547-4), vim-gtk (<< 2:7.3.547-4), vim-gnome (<< 2:7.3.547-4), vim-athena (<< 2:7.3.547-4) + , python-minimal (<< 2.7.18), libpython-stdlib (<< 2.7.18) Replaces: python-profiler (<= 2.7.1-2), python2.7-minimal (<< 2.7.3-7~) Description: Interactive high-level object-oriented language (version 2.7) Python is a high-level, interactive, object-oriented language. Its 2.7 version @@ -81,6 +82,7 @@ Recommends: libpython2.7-stdlib Replaces: python2.7 (<< 2.7.4-2), python2.7-minimal (<< 2.7.3-10), libpython2.7-stdlib (<< 2.7.8-7) Breaks: python2.7-minimal (<< 2.7.4~rc1-1~) + , python-minimal (<< 2.7.18), libpython-stdlib (<< 2.7.18) Conflicts: binfmt-support (<< 1.1.2) Description: Minimal subset of the Python language (version 2.7) This package contains some essential modules. It is normally not diff -u python2.7-2.7.18/debian/control.in python2.7-2.7.18/debian/control.in --- python2.7-2.7.18/debian/control.in +++ python2.7-2.7.18/debian/control.in @@ -34,6 +34,7 @@ Suggests: @PVER@-doc, binutils Conflicts: python-profiler (<= 2.7.1-2) Breaks: python-virtualenv (<< 1.7.1.2-2~), vim-nox (<< 2:7.3.547-4), vim-gtk (<< 2:7.3.547-4), vim-gnome (<< 2:7.3.547-4), vim-athena (<< 2:7.3.547-4) + , python-minimal (<< 2.7.18), libpython-stdlib (<< 2.7.18) Replaces: python-profiler (<= 2.7.1-2), @PVER@-minimal (<< 2.7.3-7~) Description: Interactive high-level object-oriented language (version @VER@) Python is a high-level, interactive, object-oriented language. Its @VER@ version @@ -81,6 +82,7 @@ Recommends: lib@PVER@-stdlib Replaces: @PVER@ (<< 2.7.4-2), @PVER@-minimal (<< 2.7.3-10), lib@PVER@-stdlib (<< 2.7.8-7) Breaks: @PVER@-minimal (<< 2.7.4~rc1-1~) + , python-minimal (<< 2.7.18), libpython-stdlib (<< 2.7.18) Conflicts: binfmt-support (<< 1.1.2) Description: Minimal subset of the Python language (version @VER@) This package contains some essential modules. It is normally not
ceph-common_14.2.16-2.log.gz
Description: application/gzip
ceph-common_14.2.16-2.fixed.log.gz
Description: application/gzip