Add archdir to settings
authorBrian Dolbec <dolsen@gentoo.org>
Tue, 12 Feb 2013 04:13:13 +0000 (20:13 -0800)
committerW. Trevor King <wking@tremily.us>
Sun, 15 Dec 2013 04:25:07 +0000 (20:25 -0800)
catalyst/base/stagebase.py
catalyst/defaults.py

index 005687d65b6304b787e7dfd6a8612a14caa5d8a4..e907de63132e8c36532f4e7417d12e4dff1edfa0 100644 (file)
@@ -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
index dc51667a4621269a9d4cfc6326522940ba7a4e26..d91b06d3943e9abe8c61e4c3c52b42763b474126 100644 (file)
@@ -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/",