Merge lp:~cyphermox/usb-creator/squashfs-places into lp:usb-creator

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Approved by: Mathieu Trudel-Lapierre
Approved revision: 471
Merged at revision: 471
Proposed branch: lp:~cyphermox/usb-creator/squashfs-places
Merge into: lp:usb-creator
Diff against target: 51 lines (+17/-0)
2 files modified
debian/changelog (+6/-0)
usbcreator/install.py (+11/-0)
To merge this branch: bzr merge lp:~cyphermox/usb-creator/squashfs-places
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
Review via email: mp+257829@code.launchpad.net

Description of the change

Handle the squashfs locations: erase any "old" locations which would interfere with the image we're trying to copy to disk.

To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Self-approving... :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2015-04-23 15:19:07 +0000
+++ debian/changelog 2015-04-29 21:36:09 +0000
@@ -11,6 +11,12 @@
11 proper polkit integration for KVM use.11 proper polkit integration for KVM use.
12 - CVE number pending12 - CVE number pending
1313
14 [ Mathieu Trudel-Lapierre ]
15 * usbcreator/install.py: remove the directories known to normally contain
16 a squashfs; since it could be confusing the installer if, for example, a
17 squashfs from desktop is still under casper/ after copying server files
18 to a USB key. (LP: #1117292)
19
14 -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Thu, 23 Apr 2015 11:18:01 -040020 -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Thu, 23 Apr 2015 11:18:01 -0400
1521
16usb-creator (0.2.67) vivid; urgency=medium22usb-creator (0.2.67) vivid; urgency=medium
1723
=== modified file 'usbcreator/install.py'
--- usbcreator/install.py 2015-03-10 15:24:32 +0000
+++ usbcreator/install.py 2015-04-29 21:36:09 +0000
@@ -185,6 +185,15 @@
185 self.progress_thread.start()185 self.progress_thread.start()
186 self.check()186 self.check()
187 187
188 def remove_squashfs(self):
189 logging.debug('remove_squashfs')
190 '''Remove squashfs files which may conflict.'''
191 squashfs_places = [ "install", "casper", "live" ]
192 for place in squashfs_places:
193 squashfs_place = os.path.join(self.target, place)
194 if os.path.exists(squashfs_place):
195 shutil.rmtree(squashfs_place)
196
188 def remove_extras(self):197 def remove_extras(self):
189 logging.debug('remove_extras')198 logging.debug('remove_extras')
190 '''Remove files created by usb-creator.'''199 '''Remove files created by usb-creator.'''
@@ -499,6 +508,7 @@
499 logging.debug('Removing %s' % t)508 logging.debug('Removing %s' % t)
500 shutil.rmtree(t)509 shutil.rmtree(t)
501 self.check()510 self.check()
511 self.remove_squashfs()
502 self.remove_extras()512 self.remove_extras()
503 513
504 self.initialize_progress_thread()514 self.initialize_progress_thread()
@@ -617,6 +627,7 @@
617 elif os.path.isdir(f):627 elif os.path.isdir(f):
618 logging.debug('Removing %s' % f)628 logging.debug('Removing %s' % f)
619 shutil.rmtree(f)629 shutil.rmtree(f)
630 self.remove_squashfs()
620 self.remove_extras()631 self.remove_extras()
621 self.check()632 self.check()
622 633

Subscribers

People subscribed via source and target branches