Package: python3-yaml
Version: 5.3.1-4
Severity: serious
Tags: patch

Hi,

I'm trying to solve some incomplete upgrades from buster to bullseye.
I.e. apt tries to keep some obsolete packages from buster installed and
therefore cannot upgrade some other packages instead of removing the
obsolete bits and upgrading everything upgradable. This usually needs
some additional Breaks to be added to guide apt to the right way.

One challenge upgrading from buster is to get rid of the unversioned
python and friends along with most of the packages Python 2 modules.
The ros-* stack is a bit problematic here, but this can be solved by
adding some Breaks in python3-yaml. (Sounds a bit non-intuitive to add
them to a python3-* package, but there is no better fitting package with
a sufficiently high score involved in these scenarios.)

I've run a lot of upgrade tests and the results look very promising that
we can improve the number of clean upgrade paths with this patch.


Andreas
diff -Nru pyyaml-5.3.1/debian/changelog pyyaml-5.3.1/debian/changelog
--- pyyaml-5.3.1/debian/changelog       2021-05-21 17:11:00.000000000 +0200
+++ pyyaml-5.3.1/debian/changelog       2021-06-14 00:30:26.000000000 +0200
@@ -1,3 +1,16 @@
+pyyaml (5.3.1-5) UNRELEASED; urgency=medium
+
+  * python3-yaml: Copy Breaks: python (<< 2.7.18), python-minimal (<< 2.7.18),
+    libpython-stdlib (<< 2.7.18) from python2.7 and add
+    Breaks: python-yaml (<< 5.3.1-2) for smoother upgrades from buster.
+    In some upgrade scenarios (mostly involving ros-* packages) these Breaks
+    in python2.7 were ineffective because the unversioned python packages got
+    higher scores. Copying the Breaks to python3-yaml which is the first
+    python package scoring higher than the to-be-removed packages solves these
+    issues.  (Closes: #-1)
+
+ -- Andreas Beckmann <a...@debian.org>  Mon, 14 Jun 2021 00:30:26 +0200
+
 pyyaml (5.3.1-4) unstable; urgency=medium
 
   * Team upload.
diff -Nru pyyaml-5.3.1/debian/control pyyaml-5.3.1/debian/control
--- pyyaml-5.3.1/debian/control 2021-05-21 17:11:00.000000000 +0200
+++ pyyaml-5.3.1/debian/control 2021-06-14 00:30:26.000000000 +0200
@@ -15,6 +15,11 @@
 Architecture: any
 Multi-Arch: allowed
 Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Breaks:
+ python (<< 2.7.18),
+ python-minimal (<< 2.7.18),
+ libpython-stdlib (<< 2.7.18),
+ python-yaml (<< 5.3.1-2),
 Description: YAML parser and emitter for Python3
  Python3-yaml is a complete YAML 1.1 parser and emitter for Python3.  It can
  parse all examples from the specification. The parsing algorithm is simple

Reply via email to