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

Proposed by Steve Langasek
Status: Merged
Approved by: Mathieu Trudel-Lapierre
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 Approve
Review via email: mp+348034@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index ec15591..4c51e12 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
1ubiquity (18.10.4) UNRELEASED; urgency=medium
2
3 * scripts/plugininstall.py: don't hard-code a resume partition in
4 /etc/initramfs-tools/conf.d/resume at install time. In bionic and later,
5 initramfs-tools will autodetect an appropriate resume partition at
6 initramfs generation time, so ubiquity's resume setting is redundant and
7 possibly wrong. LP: #1768230.
8
9 -- Steve Langasek <steve.langasek@ubuntu.com> Thu, 14 Jun 2018 23:01:01 -0700
10
1ubiquity (18.10.3) cosmic; urgency=medium11ubiquity (18.10.3) cosmic; urgency=medium
212
3 [ Didier Roche ]13 [ Didier Roche ]
diff --git a/scripts/plugininstall.py b/scripts/plugininstall.py
index 70c3aa9..3e171c3 100755
--- a/scripts/plugininstall.py
+++ b/scripts/plugininstall.py
@@ -758,27 +758,6 @@ class Install(install_misc.InstallBase):
758 self.db.progress('SET', 5)758 self.db.progress('SET', 5)
759 self.db.progress('STOP')759 self.db.progress('STOP')
760760
761 def get_resume_partition(self):
762 biggest_size = 0
763 biggest_partition = None
764 try:
765 with open('/proc/swaps') as swaps:
766 for line in swaps:
767 words = line.split()
768 if words[1] != 'partition':
769 continue
770 if not os.path.exists(words[0]):
771 continue
772 if words[0].startswith('/dev/zram'):
773 continue
774 size = int(words[2])
775 if size > biggest_size:
776 biggest_size = size
777 biggest_partition = words[0]
778 except Exception:
779 return None
780 return biggest_partition
781
782 def configure_hardware(self):761 def configure_hardware(self):
783 """Reconfigure several hardware-specific packages.762 """Reconfigure several hardware-specific packages.
784763
@@ -806,29 +785,6 @@ class Install(install_misc.InstallBase):
806 script += '-oem'785 script += '-oem'
807 misc.execute(script)786 misc.execute(script)
808787
809 resume = self.get_resume_partition()
810 if resume is not None:
811 resume_uuid = None
812 try:
813 resume_uuid = subprocess.Popen(
814 ['block-attr', '--uuid', resume],
815 stdout=subprocess.PIPE,
816 universal_newlines=True).communicate()[0].rstrip('\n')
817 except OSError:
818 pass
819 if resume_uuid:
820 resume = "UUID=%s" % resume_uuid
821 if os.path.exists(self.target_file('etc/initramfs-tools/conf.d')):
822 configdir = self.target_file('etc/initramfs-tools/conf.d')
823 elif os.path.exists(self.target_file('etc/mkinitramfs/conf.d')):
824 configdir = self.target_file('etc/mkinitramfs/conf.d')
825 else:
826 configdir = None
827 if configdir is not None:
828 resume_path = os.path.join(configdir, 'resume')
829 with open(resume_path, 'w') as configfile:
830 print("RESUME=%s" % resume, file=configfile)
831
832 osextras.unlink_force(self.target_file('etc/popularity-contest.conf'))788 osextras.unlink_force(self.target_file('etc/popularity-contest.conf'))
833 try:789 try:
834 participate = self.db.get('popularity-contest/participate')790 participate = self.db.get('popularity-contest/participate')

Subscribers

People subscribed via source and target branches