On Wed, Aug 4, 2010 at 3:49 PM, James Laska <jlaska(a)redhat.com> wrote:
Greetings,
I'm sending 2 patches for review. These patches were applied to git 'master'
branch. I have tested both using installs for Fedora 14 Alpha. However, more testing
would be appreciated on the shlex.split() patch.
The first patch updates cobbler/codes.py to add support for installing
'fedora14'
The second patch updates koan/app.py to use shlex.split() instead of the string.split()
method. I use write and maintain python scripts that use pykickstart to output valid
kickstart files. Pykickstart writes the url line as follows ...
url --url="http://example.org/path/to/install"
As a result, the quotes around the URL were confusing cobbler and causing it to fail
while attempting to find the kernel and initrd. It was attempting to download from
"http://example.org/path/to/install"/images/pxeboot/vmlinuz. To confirm the
pykickstart behavior, take a look at line #121 in pykickstart/commands/method.py [1]. The
attached patch uses shlex.split() to properly handle the quotes. There may be a better
way to handle this, but I found this worked.
Comments welcome.
Thanks,
James
[1]
http://git.fedorahosted.org/git/?p=pykickstart.git;a=blob;f=pykickstart/c...
Reproduced the koan bug you mention easy enough before this patch just
by manually adding those quotes around a URL line in one of my
profiles. Tested that with your patch, koan is ok, non-quoted URLs
still seem fine.
shlex method was added in Python 2.3 which should mean we're covered
back to RHEL 4.
As far as I can tell everything looks good, . Thanks for the patches,
pushing them out now. If anyone spots issues just let me know.
Cheers,
Devan
--
Devan Goodwin <dgoodwin(a)rm-rf.ca>
http://rm-rf.ca