Bug 475129 - system-config-kickstart can't resolve spaced city names in timezones
system-config-kickstart can't resolve spaced city names in timezones
Product: Fedora
Classification: Fedora
Component: system-config-kickstart (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Chris Lumens
Fedora Extras Quality Assurance
: 502849 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2008-12-07 21:46 EST by Fernando Henrique Sanches
Modified: 2009-06-01 16:27 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-12-11 13:32:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to basic.py (370 bytes, patch)
2008-12-07 22:29 EST, Fernando Henrique Sanches
no flags Details | Diff
fix space handling in timezone (1.18 KB, text/plain)
2008-12-08 16:57 EST, Chris Lumens
no flags Details

  None (edit)
Description Fernando Henrique Sanches 2008-12-07 21:46:53 EST
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

How reproducible:

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)
Actual results:

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

Expected results:
A file that would'nt generate this error.

Additional info:
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.
Comment 1 Fernando Henrique Sanches 2008-12-07 22:29:07 EST
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.
Comment 2 Chris Lumens 2008-12-08 16:57:24 EST
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.
Comment 3 Fernando Henrique Sanches 2008-12-11 07:07:55 EST
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!
Comment 4 Chris Lumens 2008-12-11 13:32:36 EST
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.
Comment 5 Chris Lumens 2009-06-01 16:27:48 EDT
*** Bug 502849 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.