liveusb/creator.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-)
New commits: commit 1415f61541477a47623797ec0239de1038fcfbfa Author: Luke Macken lmacken@redhat.com Date: Fri Jun 12 16:33:23 2009 -0400
Remove some stray print statements
diff --git a/liveusb/creator.py b/liveusb/creator.py index a0c3974..5ba5fe1 100755 --- a/liveusb/creator.py +++ b/liveusb/creator.py @@ -660,9 +660,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator): parent = self.drives[self._drive]['parent'] dev = parted.Device(path = parent) disk = parted.Disk(device = dev) - print self._drive for part in disk.partitions: - print part.getDeviceNodeName() if self._drive == "/dev/%s" %(part.getDeviceNodeName(),): return disk, part raise LiveUSBError(_("Unable to find partition"))
commit 5487a20c6902fd0124dc503055497be7ea5509ae Author: Luke Macken lmacken@redhat.com Date: Fri Jun 12 16:33:12 2009 -0400
Don't prompt about overwriting files from mtools (#491234)
diff --git a/liveusb/creator.py b/liveusb/creator.py index 7ae03fb..a0c3974 100755 --- a/liveusb/creator.py +++ b/liveusb/creator.py @@ -558,6 +558,13 @@ class LinuxLiveUSBCreator(LiveUSBCreator): if copied: break
+ # Don't prompt about overwriting files from mtools (#491234) + for ldlinux in [os.path.join(self.dest, p, 'ldlinux.sys') for p in ('syslinux', '')]: + self.log.debug('Looking for %s' % ldlinux) + if os.path.isfile(ldlinux): + self.log.debug(_("Removing") + " %s" % ldlinux) + os.unlink(ldlinux) + if self.drive['fstype'] in ('ext2', 'ext3'): shutil.move(os.path.join(syslinux_path, "syslinux.cfg"), os.path.join(syslinux_path, "extlinux.conf")) @@ -764,17 +771,21 @@ class WindowsLiveUSBCreator(LiveUSBCreator): LiveUSBCreator.install_bootloader(self) self.log.info(_("Installing bootloader")) device = self.drive['device'] - if os.path.isdir(os.path.join(device + os.path.sep, "syslinux")): - syslinuxdir = os.path.join(device + os.path.sep, "syslinux") + syslinuxdir = os.path.join(device + os.path.sep, "syslinux") + if os.path.isdir(syslinuxdir): # Python for Windows is unable to delete read-only files, and some # may exist here if the LiveUSB stick was created in Linux for f in os.listdir(syslinuxdir): os.chmod(os.path.join(syslinuxdir, f), 0777) shutil.rmtree(syslinuxdir) - shutil.move(os.path.join(device + os.path.sep, "isolinux"), - os.path.join(device + os.path.sep, "syslinux")) - os.unlink(os.path.join(device + os.path.sep, "syslinux", - "isolinux.cfg")) + shutil.move(os.path.join(device + os.path.sep, "isolinux"), syslinuxdir) + os.unlink(os.path.join(syslinuxdir, "isolinux.cfg")) + + # Don't prompt about overwriting files from mtools (#491234) + for ldlinux in [os.path.join(device + os.path.sep, p) for p in (syslinuxdir, '')]: + if os.path.isfile(ldlinux): + os.unlink(ldlinux) + self.popen('syslinux%s%s -m -a -d %s %s' % (self.opts.force and ' -f' or ' ', self.opts.safe and ' -s' or ' ', 'syslinux', device))
liveusb-creator@lists.stg.fedorahosted.org