From: Andrew Gaffney Date: Mon, 12 Jan 2009 03:31:36 +0000 (-0600) Subject: Move remaining stuff from catalyst.support to catalyst.config X-Git-Tag: CATALYST-2.0.10~3^2~181 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3ae5bf7df198161ee8071118b492b44de0ad041e;p=catalyst.git Move remaining stuff from catalyst.support to catalyst.config --- diff --git a/ChangeLog b/ChangeLog index 3f3af62e..63b576c3 100644 --- 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 + 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 modules/catalyst/hash.py, modules/catalyst/target/generic.py, modules/catalyst/target/generic_stage.py, modules/catalyst/target/grp.py, diff --git a/modules/catalyst/config.py b/modules/catalyst/config.py index ba9d03d1..53c2b920 100644 --- a/modules/catalyst/config.py +++ b/modules/catalyst/config.py @@ -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 = "" diff --git a/modules/catalyst/support.py b/modules/catalyst/support.py index f446438f..f2415061 100644 --- a/modules/catalyst/support.py +++ b/modules/catalyst/support.py @@ -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: diff --git a/modules/catalyst/util.py b/modules/catalyst/util.py index d516b1f5..4b95bc85 100644 --- a/modules/catalyst/util.py +++ b/modules/catalyst/util.py @@ -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]