Add archdir to settings
authorBrian Dolbec <dolsen@gentoo.org>
Tue, 12 Feb 2013 04:13:13 +0000 (20:13 -0800)
committerBrian Dolbec <dolsen@gentoo.org>
Mon, 4 Mar 2013 04:44:21 +0000 (20:44 -0800)
catalyst/base/stagebase.py
catalyst/defaults.py

index 71e166a588cfe377defdf889d22e15fe17bb5a29..f2ff5b869f8cd7e0c27e5c0489061592fcddb97c 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 006a3db593d72db9a802f9735064f88db52b9c30..ace8577b760f5338abf07e3e9b715a1e238b5dba 100644 (file)
@@ -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",