1 |
commit: f186361602b69e1c80bea5b43098d7cde7bddc15 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 12 04:13:13 2013 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 1 05:58:06 2015 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=f1863616 |
7 |
|
8 |
Add archdir to settings |
9 |
|
10 |
--- |
11 |
catalyst/base/stagebase.py | 8 +++----- |
12 |
catalyst/defaults.py | 2 ++ |
13 |
2 files changed, 5 insertions(+), 5 deletions(-) |
14 |
|
15 |
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py |
16 |
index 96b1c19..daf8e54 100644 |
17 |
--- a/catalyst/base/stagebase.py |
18 |
+++ b/catalyst/base/stagebase.py |
19 |
@@ -66,17 +66,15 @@ class StageBase(TargetBase, ClearBase, GenBase): |
20 |
self.archmap = {} |
21 |
self.subarchmap = {} |
22 |
machinemap = {} |
23 |
- arch_dir = self.settings["PythonDir"] + "/arch/" |
24 |
- for x in [x[:-3] for x in os.listdir(arch_dir) if x.endswith(".py")]: |
25 |
- if x == "__init__": |
26 |
- continue |
27 |
+ arch_dir = self.settings["archdir"] + "/" |
28 |
+ for x in [x[:-3] for x in os.listdir(arch_dir) if x.endswith(".py") and x != "__init__.py"]: |
29 |
try: |
30 |
fh=open(arch_dir + x + ".py") |
31 |
""" |
32 |
This next line loads the plugin as a module and assigns it to |
33 |
archmap[x] |
34 |
""" |
35 |
- self.archmap[x]=imp.load_module(x,fh,"../arch/" + x + ".py", |
36 |
+ self.archmap[x]=imp.load_module(x,fh, arch_dir + x + ".py", |
37 |
(".py", "r", imp.PY_SOURCE)) |
38 |
""" |
39 |
This next line registers all the subarches supported in the |
40 |
|
41 |
diff --git a/catalyst/defaults.py b/catalyst/defaults.py |
42 |
index 2839a3d..2f4f429 100644 |
43 |
--- a/catalyst/defaults.py |
44 |
+++ b/catalyst/defaults.py |
45 |
@@ -21,6 +21,7 @@ valid_config_file_values.extend([ "distcc", "envscript", |
46 |
verbosity = 1 |
47 |
|
48 |
confdefaults={ |
49 |
+ "archdir": "%(PythonDir)s/arch", |
50 |
"distdir": "/usr/portage/distfiles", |
51 |
"hash_function": "crc32", |
52 |
"icecream": "/var/cache/icecream", |
53 |
@@ -30,6 +31,7 @@ confdefaults={ |
54 |
"packagedir": "/usr/portage/packages", |
55 |
"portdir": "/usr/portage", |
56 |
"port_tmpdir": "/var/tmp/portage", |
57 |
+ "PythonDir": "./catalyst", |
58 |
"repo_name": "portage", |
59 |
"sharedir": "/usr/lib/catalyst", |
60 |
"shdir": "/usr/lib/catalyst/targets/", |