Error using "--generate" option to system-config-kickstart

Bug #15156 reported by Andy Bold
16
Affects Status Importance Assigned to Milestone
system-config-kickstart (Ubuntu)
Fix Released
High
Unassigned
Intrepid
Fix Released
High
Unassigned

Bug Description

Not sure if this is one error or several. Apologies if it should have been several!

Wanting to save an existing configuration I ran "system-config-kickstart
--generate myserver-ks.cfg" and got the following error:

Traceback (most recent call last):
  File "/usr/share/system-config-kickstart/system-config-kickstart.py", line 58,
in ?
    useCliMode(value)
  File "/usr/share/system-config-kickstart/system-config-kickstart.py", line 41,
in useCliMode
    import profileSystem
  File "/usr/share/system-config-kickstart/profileSystem.py", line 23, in ?
    import language_backend
ImportError: No module named language_backend

Looks like there is a dependency on system-config-language, which doesn't appear
to be available to Ubuntu.

Simple hack, commented out the calls to language_backend:

--- profileSystem.py 2005-04-09 17:15:36.499703768 +0100
+++ profileSystem.py.new 2005-04-09 17:20:07.593491248 +0100
@@ -19,14 +19,14 @@
 import string
 import sys
 import os
-# sys.path.append("/usr/share/system-config-language")
-# import language_backend
+sys.path.append("/usr/share/system-config-language")
+import language_backend
 import mouse

 class ProfileSystem:
     def __init__(self, kickstartData):
         self.kickstartData = kickstartData
- # self.languageBackend = language_backend.LanguageBackend()
+ self.languageBackend = language_backend.LanguageBackend()
         self.mouse = mouse()

         self.getLang()
@@ -42,7 +42,7 @@
         self.kickstartData.setClearPart(["--linux"])

     def getLang(self):
- # default, langs = self.languageBackend.getInstalledLangs()
+ default, langs = self.languageBackend.getInstalledLangs()
         self.kickstartData.setLang([default])
         self.kickstartData.setDefaultLang(default)
         self.kickstartData.setLangSupport(langs)

Re-running the generate command I get a different error:

Traceback (most recent call last):
  File "/usr/share/system-config-kickstart/system-config-kickstart.py", line 58,
in ?
    useCliMode(value)
  File "/usr/share/system-config-kickstart/system-config-kickstart.py", line 43,
in useCliMode
    profileSystem = profileSystem.ProfileSystem(data)
  File "/usr/share/system-config-kickstart/profileSystem.py", line 30, in __init__
    self.mouse = mouse()
TypeError: 'module' object is not callable

I am using version 2.5.20-0ubuntu10 of system-config-kickstart. Python is
version 2.4.1.

Revision history for this message
Johann Petrak (johann-petrak) wrote :

I also hit this bug -- it makes the whole package more or less unusable.
Version of system-conf-kickstart: 2.5.20-0ubuntu14
Depends: python (<< 2.5), python (>= 2.4), python-gtk2, python-glade2, console-data, hwdata, iso-codes, localechooser-data, python-apt

Revision history for this message
Paul Dufresne (paulduf) wrote :

I get the same results, BUT:

I don't really understand why you think --generate is a valid option.
man system-config-kickstart tells me that there is no options.

As I understand it, you just have to use Save file in File menu to
select the name of the configuration file.

Now, it is possible that there is really undocumented option.
Is it, or have you some documentation showing this option?

Revision history for this message
Éric Lemoine (elemoine) wrote :

I also get this language_backend error when executing system-config-kickstart --generate. On Edgy.

Revision history for this message
Johann Petrak (johann-petrak) wrote :

According to system-config-kickstart --help, the --generate option is valid: "
--generate <filename> Generate a kickstart file from the current machine and write"

The GUI does not seem to generate anything from the current configuration so this option is quite useful, if not essential.

Revision history for this message
Jonathan Anderson (jonathan-anderson) wrote :

"I also hit this bug -- it makes the whole package more or less unusable"... sounds Confirmed to me.

Changed in system-config-kickstart:
status: Unconfirmed → Confirmed
Revision history for this message
towsonu2003 (towsonu2003) wrote :

is this fixed on feisty?

Colin Watson (cjwatson)
Changed in system-config-kickstart:
assignee: kamion → nobody
Revision history for this message
olly (o-klein) wrote :

something new to this bug? has anyone a functionally kickstart.cfg for me???

Colin Watson (cjwatson)
Changed in system-config-kickstart:
importance: Medium → High
status: Confirmed → Triaged
Revision history for this message
Colin Watson (cjwatson) wrote :

Sorry for the delay in getting this fixed. I've just uploaded a fix to Intrepid.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-config-kickstart - 2.5.20-0ubuntu18

---------------
system-config-kickstart (2.5.20-0ubuntu18) intrepid; urgency=low

  * Fix --generate option for Ubuntu (LP: #15156).
    - Read language information from /etc/default/locale and
      /var/lib/locales/supported.d/.
    - Read keyboard information from /etc/default/console-setup.
    - Don't read mouse configuration from anywhere; we autodetect in nearly
      all cases anyway.
    - Read timezone information from /etc/timezone.
    - Deal with the root password being disabled.

 -- Colin Watson <email address hidden> Tue, 16 Sep 2008 15:41:53 +0100

Changed in system-config-kickstart:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.