1 |
--- |
2 |
catalyst/defaults.py | 15 +++++++++++++++ |
3 |
catalyst/main.py | 19 +++---------------- |
4 |
2 files changed, 18 insertions(+), 16 deletions(-) |
5 |
|
6 |
diff --git a/catalyst/defaults.py b/catalyst/defaults.py |
7 |
index 50d1d18..aa1e9e8 100644 |
8 |
--- a/catalyst/defaults.py |
9 |
+++ b/catalyst/defaults.py |
10 |
@@ -66,3 +66,18 @@ contents_definitions = { |
11 |
# isoinfo_f should be a last resort only |
12 |
"isoinfo_f":["calc_contents","isoinfo -f -i %(file)s"], |
13 |
} |
14 |
+ |
15 |
+ |
16 |
+confdefaults={ |
17 |
+ "distdir": "/usr/portage/distfiles", |
18 |
+ "hash_function": "crc32", |
19 |
+ "packagedir": "/usr/portage/packages", |
20 |
+ "portdir": "/usr/portage", |
21 |
+ "port_tmpdir": "/var/tmp/portage", |
22 |
+ "repo_name": "portage", |
23 |
+ "sharedir": "/usr/lib/catalyst", |
24 |
+ "snapshot_cache": "/var/tmp/catalyst/snapshot_cache", |
25 |
+ "snapshot_name": "portage-", |
26 |
+ "storedir": "/var/tmp/catalyst", |
27 |
+ } |
28 |
+ |
29 |
diff --git a/catalyst/main.py b/catalyst/main.py |
30 |
index be21970..e969896 100644 |
31 |
--- a/catalyst/main.py |
32 |
+++ b/catalyst/main.py |
33 |
@@ -22,8 +22,8 @@ sys.path.append(__selfpath__ + "/modules") |
34 |
import catalyst.config |
35 |
import catalyst.util |
36 |
from catalyst.support import CatalystError, find_binary, LockInUse |
37 |
-from defaults import (required_build_targets, valid_build_targets, |
38 |
- hash_definitions |
39 |
+from catalyst.defaults import (required_build_targets, valid_build_targets, |
40 |
+ hash_definitions, confdefaults |
41 |
) |
42 |
|
43 |
from hash_utils import HashMap |
44 |
@@ -76,19 +76,6 @@ def parse_config(myconfig): |
45 |
myconf={} |
46 |
config_file="" |
47 |
|
48 |
- confdefaults={ |
49 |
- "distdir": "/usr/portage/distfiles", |
50 |
- "hash_function": "crc32", |
51 |
- "packagedir": "/usr/portage/packages", |
52 |
- "portdir": "/usr/portage", |
53 |
- "port_tmpdir": "/var/tmp/portage", |
54 |
- "repo_name": "portage", |
55 |
- "sharedir": "/usr/lib/catalyst", |
56 |
- "snapshot_name": "portage-", |
57 |
- "snapshot_cache": "/var/tmp/catalyst/snapshot_cache", |
58 |
- "storedir": "/var/tmp/catalyst", |
59 |
- } |
60 |
- |
61 |
# first, try the one passed (presumably from the cmdline) |
62 |
if myconfig: |
63 |
if os.path.exists(myconfig): |
64 |
@@ -123,7 +110,7 @@ def parse_config(myconfig): |
65 |
sys.exit(1) |
66 |
|
67 |
# now, load up the values into conf_values so that we can use them |
68 |
- for x in confdefaults.keys(): |
69 |
+ for x in list(confdefaults): |
70 |
if x in myconf: |
71 |
print "Setting",x,"to config file value \""+myconf[x]+"\"" |
72 |
conf_values[x]=myconf[x] |
73 |
-- |
74 |
1.8.3.2 |