Red Hat Bugzilla – Bug 475129
system-config-kickstart can't resolve spaced city names in timezones
Last modified: 2009-06-01 16:27:48 EDT
Description of problem:
When you select a city name with a space on it (eg. "America/Sao Paulo"), the program will create a .cfg file with an space on it. However, programs that read this file (tested with: livecd-creator) doesn't accept a space in the city's name.
Version-Release number of selected component (if applicable):
Kickstart Configurator 2.7.20
Steps to Reproduce:
1. Start system-config-kickstart
2. Select a city with a space on it on timezone (eg. "America/Sao Paulo", "America/North Dakota/Center")
3. Save the file (Ctrl+S, Ok);
4. Try to use the file (#livecd-creator -c ks.cfg)
Line 21 of the new .cfg file is:
timezone America/North Dakota/Center
It makes livecd-creator emit the following error:
imgcreate.errors.KickstartError: Failed to parse kickstart file 'ks.cfg' : O seguinte problema ocorreu na linha 22 do arquivo kickstart:
A single argument is expected for the timezone command
A file that would'nt generate this error.
This could be actually a bug in livecd-creator.
The workaround is to choose another city on the same timezone but without a space on it's name.
Created attachment 326073 [details]
Patch to basic.py
It seems to be working properly - it won't raise the error anymore.
Not fully tested. I still had no time to test the system generated by the .cfg file. It is also possible (but improbable) that this patch break something else in the list.
Also, this will make the cities list a quite ugly. But ugly is better than bugged.
Created attachment 326209 [details]
fix space handling in timezone
Hm, what if we modify what we do on the output side instead of the input side? It's probably also worth modifying pykickstart as well to handle putting quotes around timezones if they include spaces.
Yes, much better than my ugly workaround. I tested and seems to be working nicely (now I can create the livecd without any problem, although I'm still having some problems to actually use it... but that's seems to be unrelated. The output in the .ks file seems to be right, and that's what matter here).
I will take a look at pykickstart, but don't get your hopes up. I'm not a very good programmer, and these days I'm quite busy due to college.
Well, this bug can be closed now, right? I guess that's one more victory for Fedora!
Yes, I'll go ahead and close this report since the fix will be in the next build of system-config-kickstart. Thanks for filing it.
Don't worry about pykickstart. I can take care of that too.
*** Bug 502849 has been marked as a duplicate of this bug. ***