← Back to team overview

usb-creator-hackers team mailing list archive

[Merge] lp:~yuningdodo/usb-creator/usb-creator.lp1325801-sync-syslinux-c32-files into lp:ubuntu/usb-creator

 

You have been requested to review the proposed merge of lp:~yuningdodo/usb-creator/usb-creator.lp1325801-sync-syslinux-c32-files into lp:ubuntu/usb-creator.

For more details, see:
https://code.launchpad.net/~yuningdodo/usb-creator/usb-creator.lp1325801-sync-syslinux-c32-files/+merge/249454

Make sure we use the same version of mbr.bin and syslinux *.c32 files. (LP: #1325801)

This patch was originally uploaded in bug #1325801 comment #83, I have made some tests on trusty, it can correctly create the usbstick for ubuntu 12.04, 14.10, etc., and even xubuntu.

-- 
Your team usb-creator hackers is requested to review the proposed merge of lp:~yuningdodo/usb-creator/usb-creator.lp1325801-sync-syslinux-c32-files into lp:ubuntu/usb-creator.
=== modified file 'usbcreator/install.py'
--- usbcreator/install.py	2013-01-28 12:51:45 +0000
+++ usbcreator/install.py	2015-02-12 07:35:46 +0000
@@ -19,6 +19,7 @@
 from usbcreator.misc import (
     USBCreatorProcessException,
     callable,
+    find_on_path,
     fs_size,
     popen,
     )
@@ -323,6 +324,16 @@
                 if f:
                     f.close()
         self.check()
+        if self.need_syslinux_legacy() and find_on_path('syslinux-legacy'):
+            syslinux = 'syslinux-legacy'
+        else:
+            syslinux = 'syslinux'
+        for dstname in glob.iglob(os.path.join(self.target, 'syslinux', '*.c32')):
+            filename = os.path.basename(dstname)
+            srcname = os.path.join(os.sep, 'usr', 'lib', syslinux, filename)
+            if os.path.isfile(srcname):
+                shutil.copyfile(srcname, dstname)
+        self.check()
 
     def create_persistence(self):
         logging.debug('create_persistence')