[neon/forks/ubuntu-release-upgrader/Neon/ubuntu/focal_archive] /: DistUpgrade/DistUpgradeQuirks.py: In addition to quirking python-minimal we also need to quirk python-dbg, python-doc, and python-dev. (LP: #1887544)
Brian Murray
null at kde.org
Mon Oct 19 09:41:14 BST 2020
Git commit d36e5c96d514a7bb04e179b0b7ec251d2f802f27 by Brian Murray.
Committed on 07/10/2020 at 00:02.
Pushed by sitter into branch 'Neon/ubuntu/focal_archive'.
DistUpgrade/DistUpgradeQuirks.py: In addition to quirking python-minimal we also need to quirk python-dbg, python-doc, and python-dev. (LP: #1887544)
M +25 -15 DistUpgrade/DistUpgradeQuirks.py
M +3 -0 debian/changelog
https://invent.kde.org/neon/forks/ubuntu-release-upgrader/commit/d36e5c96d514a7bb04e179b0b7ec251d2f802f27
diff --git a/DistUpgrade/DistUpgradeQuirks.py b/DistUpgrade/DistUpgradeQuirks.py
index b3fbc6c8..4c3381f4 100644
--- a/DistUpgrade/DistUpgradeQuirks.py
+++ b/DistUpgrade/DistUpgradeQuirks.py
@@ -898,22 +898,32 @@ class DistUpgradeQuirks(object):
other package and the python-is-python2 package is installed instead,
if python-minimal was installed.
"""
- old = 'python-minimal'
- new = 'python-is-python2'
+ # python-dbg must come first for reasons unknown
+ replacements = (('python-dbg', 'python2-dbg'),
+ ('python-doc', 'python2-doc'),
+ ('python-minimal', 'python-is-python2'),
+ ('python-dev', 'python-dev-is-python2'),
+ ('libpython-dev', None),
+ ('libpython-stdlib', None),
+ ('libpython-dbg', None))
cache = self.controller.cache
- if old in cache and cache[old].is_installed:
- logging.info("installing %s because %s was installed" % (new, old))
- reason = "%s was installed on the system" % old
- if not cache.mark_install(new, reason):
- logging.info("failed to install %s" % new)
- logging.info("removing %s because %s is being installed" %
- (old, new))
- reason = "%s is being installed on the system" % new
- if not cache.mark_remove(old, reason):
- logging.info("failed to remove %s", old)
-
- # protect our decision to remove legacy 'python' (as a dependency
- # of python-minimal, removed above)
+ for old, new in replacements:
+ logging.info("checking for %s" % old)
+ if old in cache and cache[old].is_installed:
+ if new:
+ logging.info("installing %s because %s was installed" %
+ (new, old))
+ reason = "%s was installed on the system" % old
+ if not cache.mark_install(new, reason):
+ logging.info("failed to install %s" % new)
+ logging.info("removing %s because %s is being installed" %
+ (old, new))
+ reason = "%s is being installed on the system" % new
+ if not cache.mark_remove(old, reason):
+ logging.info("failed to remove %s", old)
+
+ # protect our decision to remove legacy 'python' (as a
+ # dependency of python-minimal, removed above)
py = 'python'
if py in cache and cache[py].marked_delete:
resolver = apt.cache.ProblemResolver(cache)
diff --git a/debian/changelog b/debian/changelog
index 64f87e58..4211ff77 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
ubuntu-release-upgrader (1:20.04.27) focal; urgency=medium
+ * DistUpgrade/DistUpgradeQuirks.py: In addition to quirking python-minimal
+ we also need to quirk python-dbg, python-doc, and python-dev.
+ (LP: #1887544)
-- Brian Murray <brian at ubuntu.com> Wed, 09 Sep 2020 11:27:27 -0700
More information about the Neon-commits
mailing list