1 |
commit: 25a7af61391e3fa8af77beec26c95b03175342d9 |
2 |
Author: Felix Bier <Felix.Bier <AT> rohde-schwarz <DOT> com> |
3 |
AuthorDate: Thu Feb 4 00:35:52 2021 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 20 02:27:06 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=25a7af61 |
7 |
|
8 |
Rename config option 'portage_overlay' -> 'repos' |
9 |
|
10 |
This commit renames the config option 'portage_overlay' to 'repos'. |
11 |
Also, it renames the method 'portage_overlay' to 'process_repos' |
12 |
and 'set_portage_overlay' to 'set_repos'. Motivation: |
13 |
|
14 |
1) The Gentoo wiki states 'repository' as the preferred term, |
15 |
and 'overlay' only as a colloquial |
16 |
(https://wiki.gentoo.org/wiki/Ebuild_repository), |
17 |
reducing the distinction between the main repository |
18 |
and other 'overlay' repositories. |
19 |
|
20 |
3) This avoids confusion with filesystem overlays |
21 |
(via the config option 'overlay' and 'root_overlay'). |
22 |
|
23 |
2) The plural form highlights the possibility of specifying |
24 |
multiple repositories, continuing 2861038a. |
25 |
|
26 |
Signed-off-by: Felix Bier <felix.bier <AT> rohde-schwarz.com> |
27 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
28 |
|
29 |
catalyst/base/stagebase.py | 30 +++++++++++++++--------------- |
30 |
catalyst/targets/livecd_stage2.py | 2 +- |
31 |
catalyst/targets/stage1.py | 6 +++--- |
32 |
catalyst/targets/stage2.py | 6 +++--- |
33 |
catalyst/targets/stage3.py | 6 +++--- |
34 |
catalyst/targets/stage4.py | 2 +- |
35 |
doc/catalyst-config.5.txt | 2 +- |
36 |
doc/catalyst-spec.5.txt | 2 +- |
37 |
examples/generic_stage_template.spec | 4 ++-- |
38 |
examples/livecd-stage1_template.spec | 4 ++-- |
39 |
examples/livecd-stage2_template.spec | 4 ++-- |
40 |
examples/netboot_template.spec | 4 ++-- |
41 |
examples/stage4_template.spec | 4 ++-- |
42 |
13 files changed, 38 insertions(+), 38 deletions(-) |
43 |
|
44 |
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py |
45 |
index 46cb1fda..fedc8f87 100644 |
46 |
--- a/catalyst/base/stagebase.py |
47 |
+++ b/catalyst/base/stagebase.py |
48 |
@@ -81,14 +81,14 @@ class StageBase(TargetBase, ClearBase, GenBase): |
49 |
"ldflags", |
50 |
"pkgcache_path", |
51 |
"portage_confdir", |
52 |
- "portage_overlay", |
53 |
+ "repos", |
54 |
"portage_prefix", |
55 |
]) |
56 |
self.prepare_sequence = [ |
57 |
self.unpack, |
58 |
self.config_profile_link, |
59 |
self.setup_confdir, |
60 |
- self.portage_overlay, |
61 |
+ self.process_repos, |
62 |
] |
63 |
self.build_sequence = [ |
64 |
self.bind, |
65 |
@@ -206,7 +206,7 @@ class StageBase(TargetBase, ClearBase, GenBase): |
66 |
self.set_linuxrc() |
67 |
self.set_busybox_config() |
68 |
self.set_overlay() |
69 |
- self.set_portage_overlay() |
70 |
+ self.set_repos() |
71 |
self.set_root_overlay() |
72 |
|
73 |
# This next line checks to make sure that the specified variables exist on disk. |
74 |
@@ -586,13 +586,13 @@ class StageBase(TargetBase, ClearBase, GenBase): |
75 |
del self.settings[self.settings["spec_prefix"] + |
76 |
"/busybox_config"] |
77 |
|
78 |
- def set_portage_overlay(self): |
79 |
- if "portage_overlay" in self.settings: |
80 |
- if isinstance(self.settings['portage_overlay'], str): |
81 |
- self.settings["portage_overlay"] = \ |
82 |
- self.settings["portage_overlay"].split() |
83 |
- log.info('portage_overlay directories are set to: %s', |
84 |
- ' '.join(self.settings['portage_overlay'])) |
85 |
+ def set_repos(self): |
86 |
+ if 'repos' in self.settings: |
87 |
+ if isinstance(self.settings['repos'], str): |
88 |
+ self.settings['repos'] = \ |
89 |
+ self.settings['repos'].split() |
90 |
+ log.info('repos directories are set to: %s', |
91 |
+ ' '.join(self.settings['repos'])) |
92 |
|
93 |
def set_overlay(self): |
94 |
if self.settings["spec_prefix"] + "/overlay" in self.settings: |
95 |
@@ -831,10 +831,10 @@ class StageBase(TargetBase, ClearBase, GenBase): |
96 |
except OSError as e: |
97 |
raise CatalystError(f'Could not write {repo_conf_chroot}: {e}') from e |
98 |
|
99 |
- def portage_overlay(self): |
100 |
+ def process_repos(self): |
101 |
""" We copy the contents of our repos to get_repo_location(repo_name) """ |
102 |
- if "portage_overlay" in self.settings: |
103 |
- for x in self.settings["portage_overlay"]: |
104 |
+ if 'repos' in self.settings: |
105 |
+ for x in self.settings['repos']: |
106 |
if os.path.exists(x): |
107 |
name = get_repo_name(x) |
108 |
|
109 |
@@ -1145,8 +1145,8 @@ class StageBase(TargetBase, ClearBase, GenBase): |
110 |
clear_path(target) |
111 |
|
112 |
# Remove our overlays |
113 |
- if "portage_overlay" in self.settings: |
114 |
- for repo_path in self.settings["portage_overlay"]: |
115 |
+ if 'repos' in self.settings: |
116 |
+ for repo_path in self.settings['repos']: |
117 |
repo_name = get_repo_name(repo_path) |
118 |
|
119 |
repo_conf = self.get_repo_conf_path(repo_name) |
120 |
|
121 |
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py |
122 |
index ff4ea62a..774702f8 100644 |
123 |
--- a/catalyst/targets/livecd_stage2.py |
124 |
+++ b/catalyst/targets/livecd_stage2.py |
125 |
@@ -42,7 +42,7 @@ class livecd_stage2(StageBase): |
126 |
"livecd/xdm", |
127 |
"livecd/xinitrc", |
128 |
"livecd/xsession", |
129 |
- "portage_overlay", |
130 |
+ "repos", |
131 |
]) |
132 |
|
133 |
def __init__(self, spec, addlargs): |
134 |
|
135 |
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py |
136 |
index 5a154e76..0ea5f92b 100644 |
137 |
--- a/catalyst/targets/stage1.py |
138 |
+++ b/catalyst/targets/stage1.py |
139 |
@@ -66,9 +66,9 @@ class stage1(StageBase): |
140 |
if "ldflags" in self.settings: |
141 |
self.settings["LDFLAGS"] = self.settings["ldflags"] |
142 |
|
143 |
- def set_portage_overlay(self): |
144 |
- StageBase.set_portage_overlay(self) |
145 |
- if "portage_overlay" in self.settings: |
146 |
+ def set_repos(self): |
147 |
+ StageBase.set_repos(self) |
148 |
+ if "repos" in self.settings: |
149 |
log.warning( |
150 |
'Using an overlay for earlier stages could cause build issues.\n' |
151 |
"If you break it, you buy it. Don't complain to us about it.\n" |
152 |
|
153 |
diff --git a/catalyst/targets/stage2.py b/catalyst/targets/stage2.py |
154 |
index 0b7244e3..786f1020 100644 |
155 |
--- a/catalyst/targets/stage2.py |
156 |
+++ b/catalyst/targets/stage2.py |
157 |
@@ -39,9 +39,9 @@ class stage2(StageBase): |
158 |
if "ldflags" in self.settings: |
159 |
self.settings["LDFLAGS"] = self.settings["ldflags"] |
160 |
|
161 |
- def set_portage_overlay(self): |
162 |
- StageBase.set_portage_overlay(self) |
163 |
- if "portage_overlay" in self.settings: |
164 |
+ def set_repos(self): |
165 |
+ StageBase.set_repos(self) |
166 |
+ if "repos" in self.settings: |
167 |
log.warning( |
168 |
'Using an overlay for earlier stages could cause build issues.\n' |
169 |
"If you break it, you buy it. Don't complain to us about it.\n" |
170 |
|
171 |
diff --git a/catalyst/targets/stage3.py b/catalyst/targets/stage3.py |
172 |
index cfc0dbf9..d20ed679 100644 |
173 |
--- a/catalyst/targets/stage3.py |
174 |
+++ b/catalyst/targets/stage3.py |
175 |
@@ -17,9 +17,9 @@ class stage3(StageBase): |
176 |
def __init__(self, spec, addlargs): |
177 |
StageBase.__init__(self, spec, addlargs) |
178 |
|
179 |
- def set_portage_overlay(self): |
180 |
- StageBase.set_portage_overlay(self) |
181 |
- if "portage_overlay" in self.settings: |
182 |
+ def set_repos(self): |
183 |
+ StageBase.set_repos(self) |
184 |
+ if "repos" in self.settings: |
185 |
log.warning( |
186 |
'Using an overlay for earlier stages could cause build issues.\n' |
187 |
"If you break it, you buy it. Don't complain to us about it.\n" |
188 |
|
189 |
diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py |
190 |
index f8383f75..ff1d4dca 100644 |
191 |
--- a/catalyst/targets/stage4.py |
192 |
+++ b/catalyst/targets/stage4.py |
193 |
@@ -15,7 +15,7 @@ class stage4(StageBase): |
194 |
]) |
195 |
valid_values = required_values | frozenset([ |
196 |
"boot/kernel", |
197 |
- "portage_overlay", |
198 |
+ "repos", |
199 |
"stage4/empty", |
200 |
"stage4/fsscript", |
201 |
"stage4/gk_mainargs", |
202 |
|
203 |
diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt |
204 |
index ebd99b55..003d40b6 100644 |
205 |
--- a/doc/catalyst-config.5.txt |
206 |
+++ b/doc/catalyst-config.5.txt |
207 |
@@ -115,7 +115,7 @@ Defaults to `${storedir}/repos`. |
208 |
|
209 |
*repo_basedir*:: |
210 |
The target repository directory to contain the primary repo (e.g., |
211 |
-gentoo repo) and any overlays. The default location is |
212 |
+gentoo repo) and any other repos. The default location is |
213 |
`/var/db/repos`. |
214 |
|
215 |
*repo_name*:: |
216 |
|
217 |
diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt |
218 |
index 4c1df857..10eb0bb8 100644 |
219 |
--- a/doc/catalyst-spec.5.txt |
220 |
+++ b/doc/catalyst-spec.5.txt |
221 |
@@ -80,7 +80,7 @@ This is an optional directory containing portage configuration files |
222 |
`/etc/portage` and should be consistent across all targets to minimize |
223 |
problems. |
224 |
|
225 |
-*portage_overlay*:: |
226 |
+*repos*:: |
227 |
This option specifies the location of the ebuild repositories that you would |
228 |
like to have used when building this target. It takes a space-separated list |
229 |
of directory names. (example: `/usr/local/portage`). |
230 |
|
231 |
diff --git a/examples/generic_stage_template.spec b/examples/generic_stage_template.spec |
232 |
index 8c8889bf..9d91d07d 100644 |
233 |
--- a/examples/generic_stage_template.spec |
234 |
+++ b/examples/generic_stage_template.spec |
235 |
@@ -93,8 +93,8 @@ portage_confdir: |
236 |
# like to have used when building this target. It takes a space-separated list |
237 |
# of directory names. |
238 |
# example: |
239 |
-# portage_overlay: /usr/local/portage |
240 |
-portage_overlay: |
241 |
+# repos: /usr/local/portage |
242 |
+repos: |
243 |
|
244 |
# This allows the optional directory containing the output packages for |
245 |
# catalyst. Mainly used as a way for different spec files to access the same |
246 |
|
247 |
diff --git a/examples/livecd-stage1_template.spec b/examples/livecd-stage1_template.spec |
248 |
index 269a1e3d..b9edb87d 100644 |
249 |
--- a/examples/livecd-stage1_template.spec |
250 |
+++ b/examples/livecd-stage1_template.spec |
251 |
@@ -56,8 +56,8 @@ portage_confdir: |
252 |
# like to have used when building this target. It takes a space-separated list |
253 |
# of directory names. |
254 |
# example: |
255 |
-# portage_overlay: /usr/local/portage |
256 |
-portage_overlay: |
257 |
+# repos: /usr/local/portage |
258 |
+repos: |
259 |
|
260 |
# This allows the optional directory containing the output packages for |
261 |
# catalyst. Mainly used as a way for different spec files to access the same |
262 |
|
263 |
diff --git a/examples/livecd-stage2_template.spec b/examples/livecd-stage2_template.spec |
264 |
index 4f50919f..8db17ed7 100644 |
265 |
--- a/examples/livecd-stage2_template.spec |
266 |
+++ b/examples/livecd-stage2_template.spec |
267 |
@@ -56,8 +56,8 @@ portage_confdir: |
268 |
# like to have used when building this target. It takes a space-separated list |
269 |
# of directory names. |
270 |
# example: |
271 |
-# portage_overlay: /usr/local/portage |
272 |
-portage_overlay: |
273 |
+# repos: /usr/local/portage |
274 |
+repos: |
275 |
|
276 |
# This allows the optional directory containing the output packages for |
277 |
# catalyst. Mainly used as a way for different spec files to access the same |
278 |
|
279 |
diff --git a/examples/netboot_template.spec b/examples/netboot_template.spec |
280 |
index ad9d993c..07b3b53f 100644 |
281 |
--- a/examples/netboot_template.spec |
282 |
+++ b/examples/netboot_template.spec |
283 |
@@ -10,8 +10,8 @@ source_subpath: default/stage3-mips-uclibc-mips3-2006.126 |
284 |
# like to have used when building this target. It takes a space-separated list |
285 |
# of directory names. |
286 |
# example: |
287 |
-# portage_overlay: /usr/local/portage |
288 |
-portage_overlay: |
289 |
+# repos: /usr/local/portage |
290 |
+repos: |
291 |
|
292 |
boot/kernel: ip22r4k ip22r5k ip27r10k ip28r10k ip30r10k ip32r5k |
293 |
boot/kernel/ip22r4k/sources: =mips-sources-2.6.14.5 |
294 |
|
295 |
diff --git a/examples/stage4_template.spec b/examples/stage4_template.spec |
296 |
index aea70e86..5fbf6a50 100644 |
297 |
--- a/examples/stage4_template.spec |
298 |
+++ b/examples/stage4_template.spec |
299 |
@@ -56,8 +56,8 @@ portage_confdir: |
300 |
# like to have used when building this target. It takes a space-separated list |
301 |
# of directory names. |
302 |
# example: |
303 |
-# portage_overlay: /usr/local/portage |
304 |
-portage_overlay: |
305 |
+# repos: /usr/local/portage |
306 |
+repos: |
307 |
|
308 |
# This allows the optional directory containing the output packages for |
309 |
# catalyst. Mainly used as a way for different spec files to access the same |