Move remaining stuff from catalyst.support to catalyst.config
authorAndrew Gaffney <agaffney@gentoo.org>
Mon, 12 Jan 2009 03:31:36 +0000 (21:31 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Mon, 12 Jan 2009 03:31:36 +0000 (21:31 -0600)
ChangeLog
modules/catalyst/config.py
modules/catalyst/support.py
modules/catalyst/util.py

index 3f3af62e3fa11e7fd49b51842ad363c73c56bef4..63b576c3532795f952decb0399c8c0d573a7ce13 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
 # Copyright 2002-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS)
 # Distributed under the GPL v2
 
+  12 Jan 2009; Andrew Gaffney <agaffney@gentoo.org>
+  modules/catalyst/config.py, modules/catalyst/support.py,
+  modules/catalyst/util.py:
+  Move remaining stuff from catalyst.support to catalyst.config
+
   12 Jan 2009; Andrew Gaffney <agaffney@gentoo.org>
   modules/catalyst/hash.py, modules/catalyst/target/generic.py,
   modules/catalyst/target/generic_stage.py, modules/catalyst/target/grp.py,
index ba9d03d14a4b3a7913f506106b78e6882fdde3d8..53c2b920e35752d758c1b8f9a40492a487c4462f 100644 (file)
@@ -1,6 +1,29 @@
 import re
 from catalyst.error import *
 
+required_config_file_values=["storedir","sharedir","distdir","portdir"]
+valid_config_file_values=required_config_file_values[:]
+valid_config_file_values.append("PKGCACHE")
+valid_config_file_values.append("KERNCACHE")
+valid_config_file_values.append("CCACHE")
+valid_config_file_values.append("DISTCC")
+valid_config_file_values.append("ICECREAM")
+valid_config_file_values.append("ENVSCRIPT")
+valid_config_file_values.append("AUTORESUME")
+valid_config_file_values.append("FETCH")
+valid_config_file_values.append("CLEAR_AUTORESUME")
+valid_config_file_values.append("options")
+valid_config_file_values.append("DEBUG")
+valid_config_file_values.append("VERBOSE")
+valid_config_file_values.append("PURGE")
+valid_config_file_values.append("PURGEONLY")
+valid_config_file_values.append("SNAPCACHE")
+valid_config_file_values.append("snapshot_cache")
+valid_config_file_values.append("hash_function")
+valid_config_file_values.append("digests")
+valid_config_file_values.append("contents")
+valid_config_file_values.append("SEEDCACHE")
+
 class ParserBase:
 
        filename = ""
index f446438f7c1228e5bed115e77ae2bd9082458fe6..f24150613022f6c299e9f5d7fbf9a86914ba6ba8 100644 (file)
@@ -1,29 +1,3 @@
-
-from catalyst.error import *
-
-required_config_file_values=["storedir","sharedir","distdir","portdir"]
-valid_config_file_values=required_config_file_values[:]
-valid_config_file_values.append("PKGCACHE")
-valid_config_file_values.append("KERNCACHE")
-valid_config_file_values.append("CCACHE")
-valid_config_file_values.append("DISTCC")
-valid_config_file_values.append("ICECREAM")
-valid_config_file_values.append("ENVSCRIPT")
-valid_config_file_values.append("AUTORESUME")
-valid_config_file_values.append("FETCH")
-valid_config_file_values.append("CLEAR_AUTORESUME")
-valid_config_file_values.append("options")
-valid_config_file_values.append("DEBUG")
-valid_config_file_values.append("VERBOSE")
-valid_config_file_values.append("PURGE")
-valid_config_file_values.append("PURGEONLY")
-valid_config_file_values.append("SNAPCACHE")
-valid_config_file_values.append("snapshot_cache")
-valid_config_file_values.append("hash_function")
-valid_config_file_values.append("digests")
-valid_config_file_values.append("contents")
-valid_config_file_values.append("SEEDCACHE")
-
 """
 Spec file format:
 
index d516b1f520060c3b0376aa81869539f55dbbb0bb..4b95bc851646964b0dca24eda5f2ac0069080e2c 100644 (file)
@@ -3,6 +3,7 @@ Collection of utility functions for catalyst
 """
 
 import sys, traceback, os, os.path, re, time
+import catalyst
 from catalyst.error import *
 
 def capture_traceback():
@@ -178,10 +179,8 @@ def read_makeconf(mymakeconffile):
 
 def addl_arg_parse(myspec,addlargs,requiredspec,validspec):
        "helper function to help targets parse additional arguments"
-       global valid_config_file_values
-
        for x in addlargs.keys():
-               if x not in validspec and x not in valid_config_file_values and x not in requiredspec:
+               if x not in validspec and x not in catalyst.config.valid_config_file_values and x not in requiredspec:
                        raise CatalystError, "Argument \""+x+"\" not recognized."
                else:
                        myspec[x]=addlargs[x]