1 |
commit: b9f2806724077740c8fdbf8bcdb5a431cb085e9d |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 9 09:24:22 2017 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 22 01:16:21 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b9f28067 |
7 |
|
8 |
defaults.py: Update all repository, DISTDIR, PKGDIR settings to new /var paths |
9 |
|
10 |
All settings are still configurable in catalyst.conf. |
11 |
These are new reasonable settings for a relocated tree system. |
12 |
A user can still set their own locations during install, or at a later time. |
13 |
|
14 |
Default catalyst.conf settings will be changed at a later time after additional testing and |
15 |
the automatic stage building scripts have been updated. |
16 |
|
17 |
catalyst/defaults.py | 37 +++++++++++++++++++++++-------------- |
18 |
1 file changed, 23 insertions(+), 14 deletions(-) |
19 |
|
20 |
diff --git a/catalyst/defaults.py b/catalyst/defaults.py |
21 |
index 84ed2822..ed5766d6 100644 |
22 |
--- a/catalyst/defaults.py |
23 |
+++ b/catalyst/defaults.py |
24 |
@@ -31,6 +31,15 @@ valid_config_file_values.extend([ "distcc", "envscript", |
25 |
"compression_mode", "compressor_options", "decompressor_search_order", |
26 |
]) |
27 |
|
28 |
+# set our base defaults here to keep |
29 |
+# them in one location. |
30 |
+BASE_GENTOO_DIR = "/var/gentoo" |
31 |
+REPODIR = BASE_GENTOO_DIR + "/repos" |
32 |
+DISTDIR = BASE_GENTOO_DIR + "/distfiles" |
33 |
+PKGDIR = BASE_GENTOO_DIR + "/packages" |
34 |
+MAINREPO = "gentoo" |
35 |
+PORTDIR = REPODIR + "/" + MAINREPO |
36 |
+ |
37 |
confdefaults={ |
38 |
"archdir": "%(PythonDir)s/arch", |
39 |
"comp_prog": COMPRESSOR_PROGRAM_OPTIONS[TAR], |
40 |
@@ -39,28 +48,28 @@ confdefaults={ |
41 |
"compressor_options": XATTRS_OPTIONS[TAR], |
42 |
"decomp_opt": DECOMPRESSOR_PROGRAM_OPTIONS[TAR], |
43 |
"decompressor_search_order": DECOMPRESSOR_SEARCH_ORDER, |
44 |
- "distdir": "/usr/portage/distfiles", |
45 |
+ "distdir": DISTDIR[:], |
46 |
"hash_function": "crc32", |
47 |
"icecream": "/var/cache/icecream", |
48 |
'list_xattrs_opt': LIST_XATTRS_OPTIONS[TAR], |
49 |
- "local_overlay": "/usr/local/portage", |
50 |
+ "local_overlay": REPODIR[:] + "/local", |
51 |
"port_conf": "/etc/portage", |
52 |
"make_conf": "%(port_conf)s/make.conf", |
53 |
"options": set(), |
54 |
- "packagedir": "/usr/portage/packages", |
55 |
- "portdir": "/usr/portage", |
56 |
+ "packagedir": PKGDIR[:], |
57 |
+ "portdir": PORTDIR[:], |
58 |
"port_tmpdir": "/var/tmp/portage", |
59 |
"PythonDir": "./catalyst", |
60 |
- "repo_basedir": "/usr", |
61 |
- "repo_name": "portage", |
62 |
+ "repo_basedir": REPODIR[:], |
63 |
+ "repo_name": MAINREPO[:], |
64 |
"sharedir": "/usr/share/catalyst", |
65 |
"shdir": "/usr/share/catalyst/targets/", |
66 |
"snapshot_cache": "/var/tmp/catalyst/snapshot_cache", |
67 |
- "snapshot_name": "portage-", |
68 |
+ "snapshot_name": "%(repo_name)s-", |
69 |
"source_matching": "strict", |
70 |
"storedir": "/var/tmp/catalyst", |
71 |
- "target_distdir": "/var/portage/distfiles", |
72 |
- "target_pkgdir":"/var/portage/packages", |
73 |
+ "target_distdir": DISTDIR[:], |
74 |
+ "target_pkgdir": PKGDIR[:], |
75 |
} |
76 |
|
77 |
DEFAULT_CONFIG_FILE = '/etc/catalyst/catalyst.conf' |
78 |
@@ -72,11 +81,11 @@ TARGET_MOUNT_DEFAULTS = { |
79 |
"ccache": "/var/tmp/ccache", |
80 |
"dev": "/dev", |
81 |
"devpts": "/dev/pts", |
82 |
- "distdir": "/usr/portage/distfiles", |
83 |
+ "distdir": DISTDIR[:], |
84 |
"icecream": "/usr/lib/icecc/bin", |
85 |
"kerncache": "/tmp/kerncache", |
86 |
- "packagedir": "/usr/portage/packages", |
87 |
- "portdir": "/usr/portage", |
88 |
+ "packagedir": PKGDIR[:], |
89 |
+ "portdir": PORTDIR[:], |
90 |
"port_tmpdir": "/var/tmp/portage", |
91 |
"port_logdir": "/var/log/portage", |
92 |
"proc": "/proc", |
93 |
@@ -86,8 +95,8 @@ TARGET_MOUNT_DEFAULTS = { |
94 |
SOURCE_MOUNT_DEFAULTS = { |
95 |
"dev": "/dev", |
96 |
"devpts": "/dev/pts", |
97 |
- "distdir": "/usr/portage/distfiles", |
98 |
- "portdir": "/usr/portage", |
99 |
+ "distdir": DISTDIR[:], |
100 |
+ "portdir": PORTDIR[:], |
101 |
"port_tmpdir": "tmpfs", |
102 |
"proc": "/proc", |
103 |
"shm": "shmfs", |