From 60e214ffe69635b0a6e9e22c53f221c612e566b0 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Mon, 11 Feb 2013 20:13:13 -0800 Subject: [PATCH] Add archdir to settings --- catalyst/base/stagebase.py | 4 ++-- catalyst/defaults.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 005687d6..e907de63 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 dc51667a..d91b06d3 100644 --- a/catalyst/defaults.py +++ b/catalyst/defaults.py @@ -58,6 +58,7 @@ contents_definitions = { confdefaults = { + "archdir": "%(PythonDir)s/arch", "distdir": "/usr/portage/distfiles", "hash_function": "crc32", "local_overlay": "/usr/local/portage", @@ -65,6 +66,7 @@ confdefaults = { "options": set(), "packagedir": "/usr/portage/packages", "portdir": "/usr/portage", + "PythonDir": "./catalyst", "repo_name": "portage", "sharedir": "/usr/share/catalyst", "shdir": "/usr/lib/catalyst/targets/", -- 2.26.2