usb-creator-hackers team mailing list archive
-
usb-creator-hackers team
-
Mailing list archive
-
Message #00187
[Merge] lp:~vorlon/usb-creator/genisoimage-to-xorriso into lp:usb-creator
Steve Langasek has proposed merging lp:~vorlon/usb-creator/genisoimage-to-xorriso into lp:usb-creator.
Requested reviews:
usb-creator hackers (usb-creator-hackers)
For more details, see:
https://code.launchpad.net/~vorlon/usb-creator/genisoimage-to-xorriso/+merge/401342
We want to migrate away from genisoimage to xorriso.
This should not be merged until 21.10 opens.
--
Your team usb-creator hackers is requested to review the proposed merge of lp:~vorlon/usb-creator/genisoimage-to-xorriso into lp:usb-creator.
=== modified file 'debian/changelog'
--- debian/changelog 2021-04-02 15:52:52 +0000
+++ debian/changelog 2021-04-16 23:24:37 +0000
@@ -1,3 +1,9 @@
+usb-creator (0.3.10) UNRELEASED; urgency=medium
+
+ * Port from genisoimage (isoinfo) to xorriso (osirrox)
+
+ -- Steve Langasek <steve.langasek@xxxxxxxxxx> Fri, 16 Apr 2021 16:23:06 -0700
+
usb-creator (0.3.9) hirsute; urgency=medium
* debian/control: Add genisoimage to Depends as isoinfo is needed to look
=== modified file 'debian/control'
--- debian/control 2021-04-02 15:52:42 +0000
+++ debian/control 2021-04-16 23:24:37 +0000
@@ -17,7 +17,7 @@
Package: usb-creator-common
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends}, python3-dbus,
- gir1.2-udisks-2.0, udisks2, genisoimage, python3-debian
+ gir1.2-udisks-2.0, udisks2, xorriso, python3-debian
Description: create a startup disk using a CD or disc image (common files)
Startup Disk Creator converts a USB key or SD card into a volume from which you
can start up and run Ubuntu. You can also store files and settings in any space
=== modified file 'usbcreator/backends/udisks/backend.py'
--- usbcreator/backends/udisks/backend.py 2019-06-30 14:23:02 +0000
+++ usbcreator/backends/udisks/backend.py 2021-04-16 23:24:37 +0000
@@ -1,5 +1,8 @@
import dbus
import logging
+import os
+import subprocess
+import tempfile
from dbus.mainloop.glib import DBusGMainLoop, threads_init
import gi
gi.require_version('UDisks', '2.0')
@@ -145,15 +148,16 @@
# Device manipulation functions.
def _is_casper_cd(self, filename):
+ tmpfile = tempfile.mkstemp()[1]
for search in ['/.disk/info', '/.disk/mini-info']:
- cmd = ['isoinfo', '-J', '-i', filename, '-x', search]
- try:
- output = misc.popen(cmd, stderr=None)
- if output:
- return output
- except misc.USBCreatorProcessException:
- # TODO evand 2009-07-26: Error dialog.
- logging.error('Could not extract .disk/info.')
+ cmd = ['osirrox', '-dev', filename, '-extract', search, tmpfile]
+ subprocess.run(cmd, stderr=None, stdout=None)
+ if os.stat(tmpfile).st_size > 0:
+ f = open(tmpfile)
+ output = f.read()
+ f.close()
+ os.unlink(tmpfile)
+ return output
return None
def install(self, source, target, allow_system_internal=False):
Follow ups