From: Brian Dolbec Date: Tue, 12 Feb 2013 04:13:13 +0000 (-0800) Subject: Add archdir to settings X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f8235e6c40ae91639aee2e2d61932dbf985a13f2;p=catalyst.git Add archdir to settings --- diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 71e166a5..f2ff5b86 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -63,7 +63,7 @@ class StageBase(TargetBase, ClearBase, GenBase): self.archmap = {} self.subarchmap = {} machinemap = {} - arch_dir = self.settings["PythonDir"] + "/arch/" + arch_dir = self.settings["archdir"] + "/" for x in [x[:-3] for x in os.listdir(arch_dir) if x.endswith(".py") and x != "__init__.py"]: try: fh=open(arch_dir + x + ".py") @@ -71,7 +71,7 @@ class StageBase(TargetBase, ClearBase, GenBase): This next line loads the plugin as a module and assigns it to archmap[x] """ - self.archmap[x]=imp.load_module(x,fh,"../arch/" + x + ".py", + self.archmap[x]=imp.load_module(x,fh, arch_dir + x + ".py", (".py", "r", imp.PY_SOURCE)) """ This next line registers all the subarches supported in the diff --git a/catalyst/defaults.py b/catalyst/defaults.py index 006a3db5..ace8577b 100644 --- a/catalyst/defaults.py +++ b/catalyst/defaults.py @@ -63,6 +63,8 @@ confdefaults={ "storedir": "/var/tmp/catalyst", "sharedir": "/usr/lib/catalyst", "shdir": "%(sharedir)s/targets", + "PythonDir": "./catalyst", + "archdir": "%(PythonDir)s/arch", "distdir": "/usr/portage/distfiles", "repo_name": "portage", "portdir": "/usr/portage",