Writing debian installer isos fails in syslinux part
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
usb-creator (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
After fixing usb-creator so it builds on debian, I tried it on a debian box and found a problem:
in install.py is a load of code to use syslinx-legacy and apropriate options either side of the 10.04 and 10.10 Ubuntu releases.
That fails if a debian iso has been burned onto the USB stick.
target_os_ver, our_os_ver = self.os_vers()
File "/usr/lib/
target_os_ver = debian_
File "/usr/lib/
in __init__
super(
File "/usr/lib/
in __init__
self.
File "/usr/lib/
in __setattr__
self.
File "/usr/lib/
in _set_full_version
raise ValueError("Invalid version string %r" % version)
ValueError: Invalid version string 'GNU/Linux'
This is because of this code:
if os.path.
with open(os.
contents = f.readline(
if len(contents) > 2:
# Consider point releases the same as the initial release
# (10.04.4 -> 10.04)
becuause .disk/info is:
Debian GNU/Linux wheezy-DI-a1 "Wheezy" - Official Snapshot amd64 NETINST Binary-1 20120512-00:39
so the code tries to parse "GNU/Linux" as debian version number and rightly fails.
BTW I'm not sure that the 'debian_
our_os_ver = debian_
lsb_
My python is not good enough to work out what to do about this. You could just look for contents[3] and not use the 'Version' function. (There is a 'Release' fn which might be helpful here?)
Or perhaps better is to simply not do any of this checking on Debian as we've been on syslinux 2.4 since squeeze, and there isn't a syslinux-legacy package to use anyway. I'm not sure of the full implications here.
In fact how much do we care about people writing images older then 10.10 any more. Could it all just be simplified for Ubuntu too?
There is a lot of simplification possible in install_bootloader, mangle_syslinux, need_syslinux_
Someone who actually speaks python and is vaguely famliar with the code could presumably fix this without too much trouble.
Hope this is helpful to someone.
This is the patch I applied in order to build on Debian
removed dh-translations (doesn't exist in Debian) - used dpkg-vendor in rules file to call/not-call as required.
Changed description to be distro-neutral
Removed gir-unity install-dep (doesn't exist on debian)
Changed syslinux install-dep (no syslinux-legacy on debian - is this an issue technically - is syslinux 2.3x needed for some reason?
Hacked .ui files to say Debian or ubuntu, and suggest install as well a live disk. This is hacky - could be done much better to put in apropriate name for distro, or just talk about 'the image you just wrote'. Awkward to be both newbie-friendly and accurate, and cover installers as well as live images in one sentence. Suggestions for how to handle this are welcome.
Checked and updated standards-version.