Fedora Account System
Red Hat Associate
Red Hat Customer
[axet@axet-laptop livecd]$ rpm -qf /usr/lib/python2.6/site-packages/imgcreate/kickstart.py python-imgcreate-031-1.fc12.1.x86_64 [axet@axet-laptop livecd]$ ./livecd.sh rm: cannot remove `*.iso': No such file or directory Traceback (most recent call last): File "/usr/bin/livecd-creator", line 140, in <module> sys.exit(main()) File "/usr/bin/livecd-creator", line 112, in main ks = imgcreate.read_kickstart(options.kscfg) File "/usr/lib/python2.6/site-packages/imgcreate/kickstart.py", line 56, in read_kickstart except IOError, (err, msg): ValueError: need more than 1 value to unpack <<<after patch [axet@axet-laptop livecd]$ ./livecd.sh rm: cannot remove `*.iso': No such file or directory /usr/lib/python2.6/site-packages/imgcreate/errors.py:40: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 return str(self.message) Traceback (most recent call last): File "/usr/bin/livecd-creator", line 140, in <module> sys.exit(main()) File "/usr/bin/livecd-creator", line 112, in main ks = imgcreate.read_kickstart(options.kscfg) File "/usr/lib/python2.6/site-packages/imgcreate/kickstart.py", line 58, in read_kickstart "'%s' : %s" % (path, msg)) imgcreate.errors.KickstartError: Failed to read kickstart file '/home/axet/livecd/livecd.ks' : The following problem occurred on line 0 of the kickstart file: Unable to open input kickstart file: Could not open/read file:///usr/share/spin-kickstarts/fedora-livecd-desktop.ks patch: <<< version = ksversion.makeVersion() ks = ksparser.KickstartParser(version) try: ksfile = urlgrabber.urlgrab(path) ks.readKickstart(ksfile) except IOError, (err, msg): >>> version = ksversion.makeVersion() ks = ksparser.KickstartParser(version) try: ksfile = urlgrabber.urlgrab(path) ks.readKickstart(ksfile) except IOError, (msg):
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
I have a proposed patch for this awaiting review on the livecd list.
In response to Comment 2 I just applied the patch from the mailing list and it seems that to reproduce this issue you can provide an invalid %include in your base kickstart file to produce an IOError The patch works fine in testing here. I do have one concern, is this accurate error messages or is this a bug: "Failed to read kickstart file 'livecd.ks'" (It exists, it didn't fail to read it) "The following problem occurred on line 0 of the kickstart file" (Line 0 isn't where the include is at, which is incorrect, its line 11) [root@ip70-190-121-13 tmp]# livecd-creator -c livecd.ks Traceback (most recent call last): File "/usr/bin/livecd-creator", line 144, in <module> sys.exit(main()) File "/usr/bin/livecd-creator", line 115, in main ks = imgcreate.read_kickstart(options.kscfg) File "/usr/lib/python2.6/site-packages/imgcreate/kickstart.py", line 58, in read_kickstart "'%s' : %s" % (path, ''.join(e.args[-1:]))) imgcreate.errors.KickstartError/usr/lib/python2.6/site-packages/imgcreate/errors.py:40: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 return str(self.message) : Failed to read kickstart file 'livecd.ks' : The following problem occurred on line 0 of the kickstart file: Unable to open input kickstart file: Could not open/read file:///tmp/somefile.ks [root@ip70-190-121-13 tmp]# What do you think? livecd-creator bug or pykickstart? I say commit what you have, investigate the accuracy of these later or file against the right component, which is pykickstart.
As I said on http://lists.fedoraproject.org/pipermail/livecd/2010-July/006006.html : Definitely a pykickstart bug. But we might have to workaround it in livecd-tools.
The line number stuff would be a bug in pykickstart. Raising IOError with only one argument is also likely a bug in both pykickstart and urlgrabber. But the patch works by doing something reasonable with bad data. I'll explain in more detail in responding to the NACK on list, to see if we can come to an agreement on this.
A patch has been applied to master and a rebuild in rawhide should happen within a week. I am also going to make sure urlgrabber and pykickstart have bugs filed for misusing the IOError exception.
(In reply to comment #6) > I am also going to make sure urlgrabber and pykickstart have bugs filed for > misusing the IOError exception. When you have them, please put them here in Depends on:
Well. Here is a brief check of urlgrabber IOError and OSError contains: [autopsy@ip70-190-121-13 urlgrabber]$ cat *.py | grep IOError class RangeError(IOError): raise IOError('seek from end of file not supported.') raise IOError, ('ftp error', 'no host given') raise IOError, ('ftp error', msg), sys.exc_info()[2] raise IOError, ('ftp error', reason), sys.exc_info()[2] raise IOError, ('ftp error', reason), sys.exc_info()[2] class URLGrabError(IOError): 4 - IOError on fetch IOError.__init__(self, *args) except IOError, e: err = URLGrabError(4, _('IOError on %s: %s') % (self.url, e)) except IOError, e: 'error opening local file from %s, IOError: %s') % (self.url, e)) except IOError, e: 'error opening file from %s, IOError: %s') % (self.url, e)) except IOError, e: raise URLGrabError(4, _('IOError on %s: %s') %(self.url, e)) except: # IOError [autopsy@ip70-190-121-13 urlgrabber]$ [autopsy@ip70-190-121-13 urlgrabber]$ cat *.py | grep OSError 5 - OSError on fetch except OSError: except OSError, e: except OSError, e: 'error setting timestamp on file %s from %s, OSError: %s') [autopsy@ip70-190-121-13 urlgrabber]$ ============================================================================== This for pykickstart: [autopsy@ip70-190-121-13 pykickstart]$ cat *.py | grep IOError raise IOError, formatErrorMsg(lineno, msg=_("Unable to open %%ksappend file: %s") % e.strerror) raise IOError, formatErrorMsg(0, msg=_("Unable to open input kickstart file: %s") % e.strerror) except IOError: raise IOError, formatErrorMsg(0, msg=_("Unable to open input kickstart file: %s") % e.strerror) [autopsy@ip70-190-121-13 pykickstart]$ [autopsy@ip70-190-121-13 pykickstart]$ cat *.py | grep OSError [autopsy@ip70-190-121-13 pykickstart]$ Is there anywhere else we need to be looking?
I added the bugs in case you want to keep this one open until those are resolved. When (if) they are, we will be able take out the fall back to args[0].
Jasper, I think that http://lists.fedoraproject.org/pipermail/livecd/2010-July/006006.html lists all the problematic exceptions. I don't see any other issues of importance in your list. The non-numerical 'ftp error' as errno might be surprising, and raising IOError (URLGrabError) with a hardcoded errno might cause problems somewhere, but none of these are bugs nor likely to cause any problems for livecd-tools.
livecd-tools-033-1 has been built for rawhide and should fix this. (On the livecd-tools side.)
*** Bug 575564 has been marked as a duplicate of this bug. ***
livecd-tools-033-1 is in stable for F14 and F13 and testing for F12.