Merge ~vorlon/ubiquity:lp.1768230/cosmic into ubiquity:master

Proposed by Steve Langasek on 2018-06-15
Status: Merged
Approved by: Mathieu Trudel-Lapierre on 2018-06-25
Approved revision: 3ec8501710918eaa7c17239dc3053f31e0a9cef8
Merged at revision: 2aeb8c2d6f03e96a44b7fb06a7059d76e72106b7
Proposed branch: ~vorlon/ubiquity:lp.1768230/cosmic
Merge into: ubiquity:master
Diff against target: 80 lines (+10/-44)
2 files modified
debian/changelog (+10/-0)
scripts/plugininstall.py (+0/-44)
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre 2018-06-15 Approve on 2018-06-25
Review via email: mp+348034@code.launchpad.net
To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index ec15591..4c51e12 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,13 @@
6+ubiquity (18.10.4) UNRELEASED; urgency=medium
7+
8+ * scripts/plugininstall.py: don't hard-code a resume partition in
9+ /etc/initramfs-tools/conf.d/resume at install time. In bionic and later,
10+ initramfs-tools will autodetect an appropriate resume partition at
11+ initramfs generation time, so ubiquity's resume setting is redundant and
12+ possibly wrong. LP: #1768230.
13+
14+ -- Steve Langasek <steve.langasek@ubuntu.com> Thu, 14 Jun 2018 23:01:01 -0700
15+
16 ubiquity (18.10.3) cosmic; urgency=medium
17
18 [ Didier Roche ]
19diff --git a/scripts/plugininstall.py b/scripts/plugininstall.py
20index 70c3aa9..3e171c3 100755
21--- a/scripts/plugininstall.py
22+++ b/scripts/plugininstall.py
23@@ -758,27 +758,6 @@ class Install(install_misc.InstallBase):
24 self.db.progress('SET', 5)
25 self.db.progress('STOP')
26
27- def get_resume_partition(self):
28- biggest_size = 0
29- biggest_partition = None
30- try:
31- with open('/proc/swaps') as swaps:
32- for line in swaps:
33- words = line.split()
34- if words[1] != 'partition':
35- continue
36- if not os.path.exists(words[0]):
37- continue
38- if words[0].startswith('/dev/zram'):
39- continue
40- size = int(words[2])
41- if size > biggest_size:
42- biggest_size = size
43- biggest_partition = words[0]
44- except Exception:
45- return None
46- return biggest_partition
47-
48 def configure_hardware(self):
49 """Reconfigure several hardware-specific packages.
50
51@@ -806,29 +785,6 @@ class Install(install_misc.InstallBase):
52 script += '-oem'
53 misc.execute(script)
54
55- resume = self.get_resume_partition()
56- if resume is not None:
57- resume_uuid = None
58- try:
59- resume_uuid = subprocess.Popen(
60- ['block-attr', '--uuid', resume],
61- stdout=subprocess.PIPE,
62- universal_newlines=True).communicate()[0].rstrip('\n')
63- except OSError:
64- pass
65- if resume_uuid:
66- resume = "UUID=%s" % resume_uuid
67- if os.path.exists(self.target_file('etc/initramfs-tools/conf.d')):
68- configdir = self.target_file('etc/initramfs-tools/conf.d')
69- elif os.path.exists(self.target_file('etc/mkinitramfs/conf.d')):
70- configdir = self.target_file('etc/mkinitramfs/conf.d')
71- else:
72- configdir = None
73- if configdir is not None:
74- resume_path = os.path.join(configdir, 'resume')
75- with open(resume_path, 'w') as configfile:
76- print("RESUME=%s" % resume, file=configfile)
77-
78 osextras.unlink_force(self.target_file('etc/popularity-contest.conf'))
79 try:
80 participate = self.db.get('popularity-contest/participate')

Subscribers

People subscribed via source and target branches