Merge lp:~vorlon/usb-creator/genisoimage-to-xorriso into lp:usb-creator

Proposed by Steve Langasek
Status: Merged
Merged at revision: 496
Proposed branch: lp:~vorlon/usb-creator/genisoimage-to-xorriso
Merge into: lp:usb-creator
Diff against target: 64 lines (+19/-9)
3 files modified
debian/changelog (+6/-0)
debian/control (+1/-1)
usbcreator/backends/udisks/backend.py (+12/-8)
To merge this branch: bzr merge lp:~vorlon/usb-creator/genisoimage-to-xorriso
Reviewer Review Type Date Requested Status
usb-creator hackers Pending
Review via email: mp+401342@code.launchpad.net

Description of the change

We want to migrate away from genisoimage to xorriso.

This should not be merged until 21.10 opens.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2021-04-02 15:52:52 +0000
3+++ debian/changelog 2021-04-16 23:24:37 +0000
4@@ -1,3 +1,9 @@
5+usb-creator (0.3.10) UNRELEASED; urgency=medium
6+
7+ * Port from genisoimage (isoinfo) to xorriso (osirrox)
8+
9+ -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 16 Apr 2021 16:23:06 -0700
10+
11 usb-creator (0.3.9) hirsute; urgency=medium
12
13 * debian/control: Add genisoimage to Depends as isoinfo is needed to look
14
15=== modified file 'debian/control'
16--- debian/control 2021-04-02 15:52:42 +0000
17+++ debian/control 2021-04-16 23:24:37 +0000
18@@ -17,7 +17,7 @@
19 Package: usb-creator-common
20 Architecture: all
21 Depends: ${misc:Depends}, ${python3:Depends}, python3-dbus,
22- gir1.2-udisks-2.0, udisks2, genisoimage, python3-debian
23+ gir1.2-udisks-2.0, udisks2, xorriso, python3-debian
24 Description: create a startup disk using a CD or disc image (common files)
25 Startup Disk Creator converts a USB key or SD card into a volume from which you
26 can start up and run Ubuntu. You can also store files and settings in any space
27
28=== modified file 'usbcreator/backends/udisks/backend.py'
29--- usbcreator/backends/udisks/backend.py 2019-06-30 14:23:02 +0000
30+++ usbcreator/backends/udisks/backend.py 2021-04-16 23:24:37 +0000
31@@ -1,5 +1,8 @@
32 import dbus
33 import logging
34+import os
35+import subprocess
36+import tempfile
37 from dbus.mainloop.glib import DBusGMainLoop, threads_init
38 import gi
39 gi.require_version('UDisks', '2.0')
40@@ -145,15 +148,16 @@
41
42 # Device manipulation functions.
43 def _is_casper_cd(self, filename):
44+ tmpfile = tempfile.mkstemp()[1]
45 for search in ['/.disk/info', '/.disk/mini-info']:
46- cmd = ['isoinfo', '-J', '-i', filename, '-x', search]
47- try:
48- output = misc.popen(cmd, stderr=None)
49- if output:
50- return output
51- except misc.USBCreatorProcessException:
52- # TODO evand 2009-07-26: Error dialog.
53- logging.error('Could not extract .disk/info.')
54+ cmd = ['osirrox', '-dev', filename, '-extract', search, tmpfile]
55+ subprocess.run(cmd, stderr=None, stdout=None)
56+ if os.stat(tmpfile).st_size > 0:
57+ f = open(tmpfile)
58+ output = f.read()
59+ f.close()
60+ os.unlink(tmpfile)
61+ return output
62 return None
63
64 def install(self, source, target, allow_system_internal=False):

Subscribers

People subscribed via source and target branches