Merge ubuntu-release-upgrader:python-is-python2 into ubuntu-release-upgrader:ubuntu/master

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: e0d7b0c2043c4f38d51c18c6ffe602c4cf438f91
Proposed branch: ubuntu-release-upgrader:python-is-python2
Merge into: ubuntu-release-upgrader:ubuntu/master
Diff against target: 49 lines (+23/-0)
2 files modified
DistUpgrade/DistUpgradeQuirks.py (+15/-0)
debian/changelog (+8/-0)
Reviewer Review Type Date Requested Status
Brian Murray Approve
Review via email: mp+381203@code.launchpad.net

Commit message

quirks: install python-is-python2-but-deprecated if python-minimal was installed.

Description of the change

quirks: install python-is-python2-but-deprecated if python-minimal was installed.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Tested in a chroot upgrades.

Revision history for this message
Brian Murray (brian-murray) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/DistUpgrade/DistUpgradeQuirks.py b/DistUpgrade/DistUpgradeQuirks.py
index 0c8dd9d..24bd563 100644
--- a/DistUpgrade/DistUpgradeQuirks.py
+++ b/DistUpgrade/DistUpgradeQuirks.py
@@ -163,6 +163,7 @@ class DistUpgradeQuirks(object):
163 """ run after calculating the dist-upgrade """163 """ run after calculating the dist-upgrade """
164 logging.debug("running Quirks.PostDistUpgradeCache")164 logging.debug("running Quirks.PostDistUpgradeCache")
165 self._install_linux_metapackage()165 self._install_linux_metapackage()
166 self._install_python_is_python2()
166167
167 # helpers168 # helpers
168 def _get_pci_ids(self):169 def _get_pci_ids(self):
@@ -833,6 +834,20 @@ class DistUpgradeQuirks(object):
833 reason = "linux metapackage may have been accidentally uninstalled"834 reason = "linux metapackage may have been accidentally uninstalled"
834 cache.mark_install(linux_metapackage, reason)835 cache.mark_install(linux_metapackage, reason)
835836
837 def _install_python_is_python2(self):
838 """
839 Ensure the python-is-python2 is installed if python-minimal
840 was installed.
841 """
842 old = 'python-minimal'
843 new = 'python-is-python2'
844 cache = self.controller.cache
845 if old in cache and cache[old].is_installed:
846 logging.info("installing %s because %s was installed" % (new, old))
847 reason = "%s was installed on the system" % old
848 if not cache.mark_install(new, reason):
849 logging.info("failed to install %s" % new)
850
836 def ensure_recommends_are_installed_on_desktops(self):851 def ensure_recommends_are_installed_on_desktops(self):
837 """ ensure that on a desktop install recommends are installed852 """ ensure that on a desktop install recommends are installed
838 (LP: #759262)853 (LP: #759262)
diff --git a/debian/changelog b/debian/changelog
index 3d76f2c..7f002f5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
1ubuntu-release-upgrader (1:20.04.16) UNRELEASED; urgency=medium
2
3 * DistUpgrade/DistUpgradeQuirks.py: Install python-is-python2 if
4 python-minimal is installed. This preserves /usr/bin/python on
5 upgrades.
6
7 -- Dimitri John Ledkov <xnox@ubuntu.com> Wed, 25 Mar 2020 21:44:19 +0000
8
1ubuntu-release-upgrader (1:20.04.15) focal; urgency=medium9ubuntu-release-upgrader (1:20.04.15) focal; urgency=medium
210
3 * DistUpgrade/DistUpgradeCache.py: Update kernel and initrd size calculation11 * DistUpgrade/DistUpgradeCache.py: Update kernel and initrd size calculation

Subscribers

People subscribed via source and target branches