Pre-split options from config file and remove unnecessary imported modules
authorAndrew Gaffney <agaffney@gentoo.org>
Sun, 11 Jan 2009 03:36:18 +0000 (21:36 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Sun, 11 Jan 2009 03:36:18 +0000 (21:36 -0600)
ChangeLog
catalyst

index 966184bb6cf3477b51d2b81262a7a65358ccc36b..1f0fbd1c81f341809507e0f80de812dc9fa465a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 # Copyright 2002-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS)
 # Distributed under the GPL v2
 
+  11 Jan 2009; Andrew Gaffney <agaffney@gentoo.org> catalyst:
+  Pre-split options from config file and remove unnecessary imported modules
+
   11 Jan 2009; Andrew Gaffney <agaffney@gentoo.org> catalyst:
   Move code to verify digest and hash functions to a separate function
 
index 270c09d3489261f2fcc8c447bcd676799be7a83a..9cc99feb21f3f04a7c446f2adefe1149b3e5fe12 100755 (executable)
--- a/catalyst
+++ b/catalyst
@@ -4,9 +4,7 @@
 # Andrew Gaffney <agaffney@gentoo.org>
 # Chris Gianelloni <wolf31o2@gentoo.org>
 
-import os, sys, imp, string, getopt
-import pdb
-import os.path
+import os, sys, getopt
 
 __selfpath__ = os.path.abspath(os.path.dirname(__file__))
 
@@ -105,48 +103,50 @@ def parse_config(myconfig):
                        print "Setting",x,"to default value \""+confdefaults[x]+"\""
                        conf_values[x]=confdefaults[x]
 
+       split_options = conf_values["options"].split()
+
        # parse out the rest of the options from the config file
-       if "autoresume" in string.split(conf_values["options"]):
+       if "autoresume" in split_options:
                print "Autoresuming support enabled."
                conf_values["AUTORESUME"]="1"
 
-       if "ccache" in string.split(conf_values["options"]):
+       if "ccache" in split_options:
                print "Compiler cache support enabled."
                conf_values["CCACHE"]="1"
 
-       if "clear-autoresume" in string.split(conf_values["options"]):
+       if "clear-autoresume" in split_options:
                print "Cleaning autoresume flags support enabled."
                conf_values["CLEAR_AUTORESUME"]="1"
 
-#      if "compress" in string.split(conf_values["options"]):
+#      if "compress" in split_options:
 #              print "Compression enabled."
 #              conf_values["COMPRESS"]="1"
 
-       if "distcc" in string.split(conf_values["options"]):
+       if "distcc" in split_options:
                print "Distcc support enabled."
                conf_values["DISTCC"]="1"
 
-       if "icecream" in string.split(conf_values["options"]):
+       if "icecream" in split_options:
                print "Icecream compiler cluster support enabled."
                conf_values["ICECREAM"]="1"
 
-       if "kerncache" in string.split(conf_values["options"]):
+       if "kerncache" in split_options:
                print "Kernel cache support enabled."
                conf_values["KERNCACHE"]="1"
 
-       if "pkgcache" in string.split(conf_values["options"]):
+       if "pkgcache" in split_options:
                print "Package cache support enabled."
                conf_values["PKGCACHE"]="1"
 
-       if "purge" in string.split(conf_values["options"]):
+       if "purge" in split_options:
                print "Purge support enabled."
                conf_values["PURGE"]="1"
 
-       if "seedcache" in string.split(conf_values["options"]):
+       if "seedcache" in split_options:
                print "Seed cache support enabled."
                conf_values["SEEDCACHE"]="1"
 
-       if "snapcache" in string.split(conf_values["options"]):
+       if "snapcache" in split_options:
                print "Snapshot cache support enabled."
                conf_values["SNAPCACHE"]="1"
 
@@ -154,7 +154,7 @@ def parse_config(myconfig):
                print "Use of metadata_overlay module for portage enabled."
                conf_values["METADATA_OVERLAY"]="1"
 
-#      if "tarball" in string.split(conf_values["options"]):
+#      if "tarball" in split_options:
 #              print "Tarball creation enabled."
 #              conf_values["TARBALL"]="1"