Using import * with the pykickstart makes it a little difficult in places to figure out where stuff is coming from - e.g. if it was KS_GROUP_DEFAULT instead of GROUP_DEFAULT, it wouldn't be so bad, but ... Let's just use the fully qualified names of symbols. Signed-off-by: Mark McLoughlin Index: livecd/creator/livecd-creator =================================================================== --- livecd.orig/creator/livecd-creator +++ livecd/creator/livecd-creator @@ -24,11 +24,9 @@ import time import traceback import subprocess import shutil - -from pykickstart.parser import * -from pykickstart.version import * - import yum +import pykickstart.parser +import pykickstart.version class BindChrootMount: """Represents a bind mount of a directory into a chroot.""" @@ -214,11 +212,11 @@ class LiveCDYum(yum.YumBase): else: print >> sys.stderr, "No such package %s to remove" %(pkg,) - def selectGroup(self, grp, include = GROUP_DEFAULT): + def selectGroup(self, grp, include = pykickstart.parser.GROUP_DEFAULT): yum.YumBase.selectGroup(self, grp) - if include == GROUP_REQUIRED: + if include == pykickstart.parser.GROUP_REQUIRED: map(lambda p: self.deselectPackage(p), grp.default_packages.keys()) - elif include == GROUP_ALL: + elif include == pykickstart.parser.GROUP_ALL: map(lambda p: self.selectPackage(p), grp.optional_packages.keys()) def addRepository(self, name, url = None, mirrorlist = None): @@ -549,7 +547,7 @@ class InstallationTarget: f.close() # and now, for arbitrary %post scripts - for s in filter(lambda s: s.type == KS_SCRIPT_POST, + for s in filter(lambda s: s.type == pykickstart.parser.KS_SCRIPT_POST, ksparser.handler.scripts): # we can only safely run scripts in the chroot if not s.inChroot: @@ -769,7 +767,7 @@ def main(): continue if o in ("-p", "--package"): if a.startswith("@"): - groups.append((a[1:], GROUP_DEFAULT)) + groups.append((a[1:], pykickstart.parser.GROUP_DEFAULT)) else: packages.append(a) continue @@ -788,7 +786,8 @@ def main(): print "Unknown option %s"%o sys.exit(2) - ksparser = KickstartParser(makeVersion()) + ksversion = pykickstart.version.makeVersion() + ksparser = pykickstart.parser.KickstartParser(ksversion) if not kscfg: if len(packages) == 0: print "No packages specified." --