Bug 475129

Summary: system-config-kickstart can't resolve spaced city names in timezones
Product: [Fedora] Fedora Reporter: Fernando Henrique Sanches <fernandohsanches>
Component: system-config-kickstartAssignee: Chris Lumens <clumens>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: clumens, fernandohsanches, redhatbugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-11 18:32:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to basic.py
none
fix space handling in timezone none

Description Fernando Henrique Sanches 2008-12-08 02:46:53 UTC
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:
Totally.

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-08 03:29:07 UTC
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 21:57:24 UTC
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 12:07:55 UTC
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 18:32:36 UTC
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 20:27:48 UTC
*** Bug 502849 has been marked as a duplicate of this bug. ***