Merge ~vorlon/ubiquity:lp.1768230/bionic into ubiquity:bionic

Proposed by Steve Langasek on 2018-06-15
Status: Merged
Merged at revision: ceb64eb9100620f504f7978f8bb63ba07ff7dec9
Proposed branch: ~vorlon/ubiquity:lp.1768230/bionic
Merge into: ubiquity:bionic
Diff against target: 89 lines (+12/-44) (has conflicts)
2 files modified
debian/changelog (+12/-0)
scripts/plugininstall.py (+0/-44)
Conflict in debian/changelog
Reviewer Review Type Date Requested Status
Ubuntu Installer Team 2018-06-15 Pending
Review via email: mp+348033@code.launchpad.net
To post a comment you must log in.
Brian Murray (brian-murray) wrote :

This seems worth getting into 18.04.2.

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

Subscribers

People subscribed via source and target branches