Merge ~chad.smith/ubuntu-release-upgrader:esm-support-pro-upgrades into ubuntu-release-upgrader:ubuntu/master

Proposed by Chad Smith
Status: Merged
Merged at revision: 2bd0e2db8200c8a79916804837454919329112e0
Proposed branch: ~chad.smith/ubuntu-release-upgrader:esm-support-pro-upgrades
Merge into: ubuntu-release-upgrader:ubuntu/master
Diff against target: 72 lines (+21/-2)
4 files modified
DistUpgrade/DistUpgradeController.py (+7/-0)
data/mirrors.cfg (+2/-0)
debian/changelog (+10/-0)
utils/update_mirrors.py (+2/-2)
Reviewer Review Type Date Requested Status
Brian Murray Pending
Review via email: mp+391183@code.launchpad.net

Description of the change

Remaining barriers to upgrade support for Ubuntu Advantage. I've filed/ammended the current bugs for this feature/bugfix:

 [1] Add UA PPAs to mirrors.cfg: https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1893717

 [2] Drop apt cache lock inside runPostInstallScripts: https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1897778

Commit details:
 - 3c23ab91. add ubuntu-advantage PPA to valid commercial mirror URLs

 - 6b6f79583. release apt cache lock during PostUpgradeScripts runs (allows ua tools to upgrade apt sources due to release contract differences)

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

One in-line comment.

Revision history for this message
Chad Smith (chad.smith) :
Revision history for this message
Brian Murray (brian-murray) wrote :

FYI - the debian/changelog referenced the same bug number twice. I'll sort it out though.

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..745e419 100644
3--- a/DistUpgrade/DistUpgradeController.py
4+++ b/DistUpgrade/DistUpgradeController.py
5@@ -1518,8 +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 # now run the post-upgrade fixup scripts (if any)
14+ if self.cache:
15+ self.cache.release_lock()
16 for script in self.config.getlist("Distro","PostInstallScripts"):
17 if not os.path.exists(script):
18 logging.warning("PostInstallScript: '%s' not found" % script)
19@@ -1531,6 +1536,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/data/mirrors.cfg b/data/mirrors.cfg
29index 6ba42de..af04ae1 100644
30--- a/data/mirrors.cfg
31+++ b/data/mirrors.cfg
32@@ -17,6 +17,8 @@ ftp://ddebs.ubuntu.com/
33 #commercial (both urls are valid)
34 http://archive.canonical.com
35 http://archive.canonical.com/ubuntu/
36+
37+https://private-ppa.launchpad.net/ubuntu-advantage/stable/ubuntu
38 https://esm.ubuntu.com/ubuntu/
39 https://esm.ubuntu.com/apps/ubuntu/
40 https://esm.ubuntu.com/cc/ubuntu/
41diff --git a/debian/changelog b/debian/changelog
42index 834fa7d..671d3e8 100644
43--- a/debian/changelog
44+++ b/debian/changelog
45@@ -1,3 +1,13 @@
46+ubuntu-release-upgrader (1:20.10.12) groovy; urgency=medium
47+
48+ [ Chad Smith ]
49+ * data/mirrors.cfg: add ubuntu advantage pro PPA url as valid mirror
50+ (LP: #1893717)
51+ * DistUpgrade/DistUpgradeController.py: release cache lock during
52+ runPostInstallScripts (LP: #1893717)
53+
54+ -- Chad Smith <chad.smith@canonical.com> Tue, 22 Sep 2020 16:59:52 -0600
55+
56 ubuntu-release-upgrader (1:20.10.11) groovy; urgency=medium
57
58 [ Brian Murray ]
59diff --git a/utils/update_mirrors.py b/utils/update_mirrors.py
60index f604ad6..05ceadb 100755
61--- a/utils/update_mirrors.py
62+++ b/utils/update_mirrors.py
63@@ -15,8 +15,8 @@ d = feedparser.parse("https://launchpad.net/ubuntu/+archivemirrors-rss")
64 #pp = pprint.PrettyPrinter(indent=4)
65 #pp.pprint(d)
66
67-# the first 29 lines are permanent
68-permanent_lines = 29
69+# the first 31 lines are permanent
70+permanent_lines = 31
71 lp_mirrors = set()
72 new_mirrors = set()
73

Subscribers

People subscribed via source and target branches