Bug 445195 - system-config-kickstart fails to load anaconda-ks.cfg with timezone set as 'timezone --utc Etc/GMT-6'
system-config-kickstart fails to load anaconda-ks.cfg with timezone set as 't...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: system-config-kickstart (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Chris Lumens
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-05 08:12 EDT by ritz
Modified: 2008-05-07 13:54 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-06 13:16:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description ritz 2008-05-05 08:12:56 EDT
+++ This bug was initially created as a clone of Bug #445194 +++

Description of problem:
After installing 5.1 if we try loading the default /root/anaconda-ks.cfg file
from system-config-kickstart it fails with below backtrace. This occur only with
timezone set as "timezone --utc Etc/GMT-6" which is only available at the
install time.

#system-config-kickstart anaconda-ks.cfg
Traceback (most recent call last):
 File "/usr/bin/system-config-kickstart", line 82, in ?
   kickstartGui.kickstartGui(file)
 File "/usr/share/system-config-kickstart/kickstartGui.py", line 172, in __init__
   self.applyKsdata()
 File "/usr/share/system-config-kickstart/kickstartGui.py", line 311, in applyKsdata
   self.basic_class.applyKsdata()
 File "/usr/share/system-config-kickstart/basic.py", line 228, in applyKsdata
   self.timezone_combo.list.select_item(self.timezone_list.index(self.ksdata.t
imezone["timezone"]))
ValueError: list.index(x): x not in list


Version-Release number of selected component (if applicable):
system-config-kickstart-2.6.19-1.el5.src.rpm

How reproducible:
always

Steps to Reproduce:
1. Install RHEL5 with timezone as Etc/GMT-6 ( available at install time ).
2. Post install run command below :

#system-config-kickstart /root/anaconda-ks.cfg

Actual results:
system-config-kickstart fails with backtrace provided.

Expected results:
system-config-kickstart should load the file without any errors.

Additional info:

In system-config-kickstart - "/usr/share/system-config-kickstart/basic.py",
timezone_list is read from /usr/share/zoneinfo/zone.tab, provided by tzdata
package. This file does not list any time zone under "Etc".

       #populate time zone combo
       if os.access("/usr/share/zoneinfo/zone.tab", os.R_OK):
           tz = open ("/usr/share/zoneinfo/zone.tab", "r")
           lines = tz.readlines()
           tz.close()
                   ...
                   self.timezone_list.append(tokens[2])

In anaconda - "/usr/lib/anaconda/textw/timezone_text.py", timezone is read using
zonetab file from system-config-date

   def getTimezoneList(self):
        import zonetab

        zt = zonetab.ZoneTab()
        zoneList = [ x.tz for x in zt.getEntries() ]
        zoneList.sort()
        return zoneList


The attached patch rewrites system-config-kickstart to use zonetab from
system-config-date package.

-- Additional comment from rkhadgar@redhat.com on 2008-05-05 08:09 EST --
Created an attachment (id=304524)
patch
Comment 1 Chris Lumens 2008-05-06 13:16:08 EDT
This will be in the next build of system-config-keyboard.  Thanks for the patch.

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