# 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,
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 = ""
-
-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:
"""
import sys, traceback, os, os.path, re, time
+import catalyst
from catalyst.error import *
def capture_traceback():
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]