Merge ~chad.smith/ubuntu/+source/ubuntu-release-upgrader:uru-focal-ubuntu-advantage into ubuntu/+source/ubuntu-release-upgrader:ubuntu/focal-proposed

Proposed by Chad Smith
Status: Merged
Merge reported by: Chad Smith
Merged at revision: 6e4e398848c09631ce8122130935b07139f2199e
Proposed branch: ~chad.smith/ubuntu/+source/ubuntu-release-upgrader:uru-focal-ubuntu-advantage
Merge into: ubuntu/+source/ubuntu-release-upgrader:ubuntu/focal-proposed
Diff against target: 150 lines (+55/-19)
6 files modified
DistUpgrade/DistUpgradeController.py (+8/-0)
DistUpgrade/DistUpgradeQuirks.py (+25/-15)
data/DistUpgrade.cfg.bionic (+1/-1)
data/mirrors.cfg (+2/-0)
debian/changelog (+17/-1)
utils/update_mirrors.py (+2/-2)
Reviewer Review Type Date Requested Status
Brian Murray (community) Approve
Review via email: mp+391907@code.launchpad.net

Description of the change

Kept released version at 1:20.04.28 since 27 was released to -proposed

SRU of ESM upgrade support locks, official public PPA mirror

6 cherry picks:

git cherry-pick 6b6f79583687e56305a21f88d895925231e553b9 # ubuntu/master
git cherry-pick 3c23ab918585a9a0e72e60564ba734789f939813 # ubuntu/master
git cherry-pick 1fc540b9f5432539133db61a16af4b495be63a89 # ubuntu/master
git cherry-pick af4edfce71f3a98946fb06f823968e4aa4e5a4d7 # ubuntu/master
git cherry-pick cc15ee5e15a0b1ec20aec50d6b8dd7c03c3b90c7 # ubuntu/focal
git cherry-pick d36e5c96d514a7bb04e179b0b7ec251d2f802f27 # ubuntu/focal

Add changlog entry for 1:20.04.28

  [ Chad Smith ]
  * data/mirrors.cfg: add ubuntu advantage pro PPA url as valid mirror
    (LP: #1893717)
  * DistUpgrade/DistUpgradeController.py: release cache lock during
    runPostInstallScripts (LP: #1897778)

  [ Brian Murray ]
  * DistUpgrade/DistUpgradeQuirks.py: In addition to quirking python-minimal
    we also need to quirk python-dbg, python-doc, and python-dev.
    (LP: #1887544)

To post a comment you must log in.
6e4e398... by Chad Smith

changelog

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

Because 1:20.04.27 did exist in the archive, although it was only in -proposed, it is possible that it is installed on user's systems. Subsequently, we need to use a version greater than it so those users will get the fixes we are making. (I realize that is less true because we are changing the dist-upgrader tarball but still we should use best practices here.)

review: Needs Fixing
Revision history for this message
Brian Murray (brian-murray) wrote :

This was merged and uploaded to the unapproved SRU queue.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/DistUpgrade/DistUpgradeController.py b/DistUpgrade/DistUpgradeController.py
2index 9f4e76b..18e1ac3 100644
3--- a/DistUpgrade/DistUpgradeController.py
4+++ b/DistUpgrade/DistUpgradeController.py
5@@ -1518,7 +1518,13 @@ class DistUpgradeController(object):
6 """
7 scripts that are run in any case after the distupgrade finished
8 whether or not it was successful
9+
10+ Cache lock is released during script runs in the event that the
11+ PostInstallScripts require apt or dpkg changes.
12 """
13+ if self.cache:
14+ self.cache.release_lock()
15+ self.cache.unlock_lists_dir()
16 # now run the post-upgrade fixup scripts (if any)
17 for script in self.config.getlist("Distro","PostInstallScripts"):
18 if not os.path.exists(script):
19@@ -1531,6 +1537,8 @@ class DistUpgradeController(object):
20 self._view.getTerminal().call([script], hidden=True)
21 except Exception as e:
22 logging.error("got error from PostInstallScript %s (%s)" % (script, e))
23+ if self.cache:
24+ self.cache.get_lock()
25
26 def abort(self):
27 """ abort the upgrade, cleanup (as much as possible) """
28diff --git a/DistUpgrade/DistUpgradeQuirks.py b/DistUpgrade/DistUpgradeQuirks.py
29index b3fbc6c..4c3381f 100644
30--- a/DistUpgrade/DistUpgradeQuirks.py
31+++ b/DistUpgrade/DistUpgradeQuirks.py
32@@ -898,22 +898,32 @@ class DistUpgradeQuirks(object):
33 other package and the python-is-python2 package is installed instead,
34 if python-minimal was installed.
35 """
36- old = 'python-minimal'
37- new = 'python-is-python2'
38+ # python-dbg must come first for reasons unknown
39+ replacements = (('python-dbg', 'python2-dbg'),
40+ ('python-doc', 'python2-doc'),
41+ ('python-minimal', 'python-is-python2'),
42+ ('python-dev', 'python-dev-is-python2'),
43+ ('libpython-dev', None),
44+ ('libpython-stdlib', None),
45+ ('libpython-dbg', None))
46 cache = self.controller.cache
47- if old in cache and cache[old].is_installed:
48- logging.info("installing %s because %s was installed" % (new, old))
49- reason = "%s was installed on the system" % old
50- if not cache.mark_install(new, reason):
51- logging.info("failed to install %s" % new)
52- logging.info("removing %s because %s is being installed" %
53- (old, new))
54- reason = "%s is being installed on the system" % new
55- if not cache.mark_remove(old, reason):
56- logging.info("failed to remove %s", old)
57-
58- # protect our decision to remove legacy 'python' (as a dependency
59- # of python-minimal, removed above)
60+ for old, new in replacements:
61+ logging.info("checking for %s" % old)
62+ if old in cache and cache[old].is_installed:
63+ if new:
64+ logging.info("installing %s because %s was installed" %
65+ (new, old))
66+ reason = "%s was installed on the system" % old
67+ if not cache.mark_install(new, reason):
68+ logging.info("failed to install %s" % new)
69+ logging.info("removing %s because %s is being installed" %
70+ (old, new))
71+ reason = "%s is being installed on the system" % new
72+ if not cache.mark_remove(old, reason):
73+ logging.info("failed to remove %s", old)
74+
75+ # protect our decision to remove legacy 'python' (as a
76+ # dependency of python-minimal, removed above)
77 py = 'python'
78 if py in cache and cache[py].marked_delete:
79 resolver = apt.cache.ProblemResolver(cache)
80diff --git a/data/DistUpgrade.cfg.bionic b/data/DistUpgrade.cfg.bionic
81index aa45625..452c721 100644
82--- a/data/DistUpgrade.cfg.bionic
83+++ b/data/DistUpgrade.cfg.bionic
84@@ -48,7 +48,7 @@ EnableApport=yes
85 KeyDependencies=lightdm, unity, ubuntu-artwork, ubuntu-sounds
86 # those pkgs will be marked remove right after the distUpgrade in the cache
87 PostUpgradeRemove=gnome-cups-manager, powermanagement-interface, deskbar-applet, nautilus-cd-burner
88-ForcedObsoletes=desktop-effects, gnome-app-install, policykit-gnome, gnome-mount, gnome-software-plugin-snap
89+ForcedObsoletes=desktop-effects, gnome-app-install, policykit-gnome, gnome-mount
90
91 [kubuntu-desktop]
92 KeyDependencies=plasma-desktop, kubuntu-settings-desktop
93diff --git a/data/mirrors.cfg b/data/mirrors.cfg
94index aa935f7..6f51fd8 100644
95--- a/data/mirrors.cfg
96+++ b/data/mirrors.cfg
97@@ -17,6 +17,8 @@ ftp://ddebs.ubuntu.com/
98 #commercial (both urls are valid)
99 http://archive.canonical.com
100 http://archive.canonical.com/ubuntu/
101+
102+http://ppa.launchpad.net/ua-client/stable/ubuntu
103 https://esm.ubuntu.com/ubuntu/
104 https://esm.ubuntu.com/apps/ubuntu/
105 https://esm.ubuntu.com/cc/ubuntu/
106diff --git a/debian/changelog b/debian/changelog
107index 7375b3c..ff8cc04 100644
108--- a/debian/changelog
109+++ b/debian/changelog
110@@ -1,9 +1,25 @@
111+ubuntu-release-upgrader (1:20.04.28) focal; urgency=medium
112+
113+ [ Brian Murray ]
114+ * DistUpgrade/DistUpgradeQuirks.py: In addition to quirking python-minimal
115+ we also need to quirk python-dbg, python-doc, and python-dev.
116+ (LP: #1887544)
117+
118+ [ Chad Smith ]
119+ * data/mirrors.cfg: add all ubuntu-advantage services as valid mirrors.
120+ This includes: fips, fips-updates, esm-infra, esm-apps and cc-eal and
121+ Ubuntu Pro stable public PPA. (LP: #1893717)
122+ * DistUpgrade/DistUpgradeController.py: release cache lock during
123+ runPostInstallScripts (LP: #1897778)
124+
125+ -- Chad Smith <chad.smith@canonical.com> Wed, 07 Oct 2020 10:49:37 -0600
126+
127 ubuntu-release-upgrader (1:20.04.27) focal; urgency=medium
128
129 * data/DistUpgrade.cfg.bionic: Add gnome-software-plugin-snap to
130 ForcedObsoletes for ubuntu-desktop and ubuntukylin-desktop only. This
131 allows multiple packages to be offered for removal after the upgrade
132- completes. (LP: #1894919)
133+ completes. (LP: #1894919)
134
135 -- Brian Murray <brian@ubuntu.com> Wed, 09 Sep 2020 11:27:27 -0700
136
137diff --git a/utils/update_mirrors.py b/utils/update_mirrors.py
138index f604ad6..05ceadb 100755
139--- a/utils/update_mirrors.py
140+++ b/utils/update_mirrors.py
141@@ -15,8 +15,8 @@ d = feedparser.parse("https://launchpad.net/ubuntu/+archivemirrors-rss")
142 #pp = pprint.PrettyPrinter(indent=4)
143 #pp.pprint(d)
144
145-# the first 29 lines are permanent
146-permanent_lines = 29
147+# the first 31 lines are permanent
148+permanent_lines = 31
149 lp_mirrors = set()
150 new_mirrors = set()
151

Subscribers

People subscribed via source and target branches