1 |
commit: 3bf3321550ee4de50b96c3d4a0302cf3fdf947f8 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 12 03:51:52 2013 +0000 |
4 |
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> |
5 |
CommitDate: Tue Sep 2 05:51:54 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3bf33215 |
7 |
|
8 |
Move base stage and target files to thier own sub-pkg |
9 |
|
10 |
Fix an indent error in grp_target.py |
11 |
|
12 |
Conflicts: |
13 |
catalyst/targets/embedded_target.py |
14 |
catalyst/targets/grp_target.py |
15 |
catalyst/targets/livecd_stage1_target.py |
16 |
catalyst/targets/livecd_stage2_target.py |
17 |
catalyst/targets/netboot2_target.py |
18 |
catalyst/targets/netboot_target.py |
19 |
catalyst/targets/stage1_target.py |
20 |
catalyst/targets/stage2_target.py |
21 |
catalyst/targets/stage3_target.py |
22 |
catalyst/targets/stage4_target.py |
23 |
catalyst/targets/tinderbox_target.py |
24 |
|
25 |
--- |
26 |
catalyst/base/__init__.py | 1 + |
27 |
catalyst/{targets => base}/clearbase.py | 0 |
28 |
catalyst/{targets => base}/genbase.py | 0 |
29 |
.../generic_stage_target.py => base/stagebase.py} | 8 ++--- |
30 |
catalyst/{targets => base}/targetbase.py | 0 |
31 |
catalyst/targets/embedded_target.py | 12 ++++---- |
32 |
catalyst/targets/grp_target.py | 34 +++++++++++++--------- |
33 |
catalyst/targets/livecd_stage1_target.py | 21 ++++++++----- |
34 |
catalyst/targets/livecd_stage2_target.py | 13 +++++---- |
35 |
catalyst/targets/netboot2_target.py | 17 +++++++---- |
36 |
catalyst/targets/netboot_target.py | 15 ++++++---- |
37 |
catalyst/targets/snapshot_target.py | 4 +-- |
38 |
catalyst/targets/stage1_target.py | 17 ++++++----- |
39 |
catalyst/targets/stage2_target.py | 15 ++++++---- |
40 |
catalyst/targets/stage3_target.py | 12 ++++---- |
41 |
catalyst/targets/stage4_target.py | 8 ++--- |
42 |
catalyst/targets/tinderbox_target.py | 11 ++++--- |
43 |
17 files changed, 113 insertions(+), 75 deletions(-) |
44 |
|
45 |
diff --git a/catalyst/base/__init__.py b/catalyst/base/__init__.py |
46 |
new file mode 100644 |
47 |
index 0000000..8b13789 |
48 |
--- /dev/null |
49 |
+++ b/catalyst/base/__init__.py |
50 |
@@ -0,0 +1 @@ |
51 |
+ |
52 |
|
53 |
diff --git a/catalyst/targets/clearbase.py b/catalyst/base/clearbase.py |
54 |
similarity index 100% |
55 |
rename from catalyst/targets/clearbase.py |
56 |
rename to catalyst/base/clearbase.py |
57 |
|
58 |
diff --git a/catalyst/targets/genbase.py b/catalyst/base/genbase.py |
59 |
similarity index 100% |
60 |
rename from catalyst/targets/genbase.py |
61 |
rename to catalyst/base/genbase.py |
62 |
|
63 |
diff --git a/catalyst/targets/generic_stage_target.py b/catalyst/base/stagebase.py |
64 |
similarity index 99% |
65 |
rename from catalyst/targets/generic_stage_target.py |
66 |
rename to catalyst/base/stagebase.py |
67 |
index 296eee3..bebb5dc 100644 |
68 |
--- a/catalyst/targets/generic_stage_target.py |
69 |
+++ b/catalyst/base/stagebase.py |
70 |
@@ -14,13 +14,13 @@ from catalyst.defaults import (SOURCE_MOUNT_DEFAULTS, TARGET_MOUNT_DEFAULTS, |
71 |
PORT_LOGDIR_CLEAN) |
72 |
from catalyst.support import (CatalystError, msg, file_locate, normpath, |
73 |
touch, cmd, warn, list_bashify, read_makeconf, read_from_clst, ismount) |
74 |
-from catalyst.targets.targetbase import TargetBase |
75 |
-from catalyst.targets.clearbase import ClearBase |
76 |
-from catalyst.targets.genbase import GenBase |
77 |
+from catalyst.base.targetbase import TargetBase |
78 |
+from catalyst.base.clearbase import ClearBase |
79 |
+from catalyst.base.genbase import GenBase |
80 |
from catalyst.lock import LockDir |
81 |
|
82 |
|
83 |
-class generic_stage_target(TargetBase, ClearBase, GenBase): |
84 |
+class StageBase(TargetBase, ClearBase, GenBase): |
85 |
""" |
86 |
This class does all of the chroot setup, copying of files, etc. It is |
87 |
the driver class for pretty much everything that Catalyst does. |
88 |
|
89 |
diff --git a/catalyst/targets/targetbase.py b/catalyst/base/targetbase.py |
90 |
similarity index 100% |
91 |
rename from catalyst/targets/targetbase.py |
92 |
rename to catalyst/base/targetbase.py |
93 |
|
94 |
diff --git a/catalyst/targets/embedded_target.py b/catalyst/targets/embedded_target.py |
95 |
index 7cee7a6..528d545 100644 |
96 |
--- a/catalyst/targets/embedded_target.py |
97 |
+++ b/catalyst/targets/embedded_target.py |
98 |
@@ -10,12 +10,12 @@ ROOT=/tmp/submerge emerge --something foo bar . |
99 |
""" |
100 |
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. |
101 |
|
102 |
-import os,string,imp,types,shutil |
103 |
-from catalyst.support import * |
104 |
-from generic_stage_target import * |
105 |
-from stat import * |
106 |
|
107 |
-class embedded_target(generic_stage_target): |
108 |
+from catalyst.support import normpath |
109 |
+ |
110 |
+from catalyst.base.stagebase import StageBase |
111 |
+ |
112 |
+class embedded_target(StageBase): |
113 |
""" |
114 |
Builder class for embedded target |
115 |
""" |
116 |
@@ -27,7 +27,7 @@ class embedded_target(generic_stage_target): |
117 |
if "embedded/fs-type" in addlargs: |
118 |
self.valid_values.append("embedded/fs-ops") |
119 |
|
120 |
- generic_stage_target.__init__(self,spec,addlargs) |
121 |
+ StageBase.__init__(self,spec,addlargs) |
122 |
self.set_build_kernel_vars(addlargs) |
123 |
|
124 |
def set_action_sequence(self): |
125 |
|
126 |
diff --git a/catalyst/targets/grp_target.py b/catalyst/targets/grp_target.py |
127 |
index 033db75..deba80a 100644 |
128 |
--- a/catalyst/targets/grp_target.py |
129 |
+++ b/catalyst/targets/grp_target.py |
130 |
@@ -3,11 +3,18 @@ Gentoo Reference Platform (GRP) target |
131 |
""" |
132 |
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. |
133 |
|
134 |
-import os,types,glob |
135 |
-from catalyst.support import * |
136 |
-from generic_stage_target import * |
137 |
+import os |
138 |
+import types |
139 |
+import glob |
140 |
|
141 |
-class grp_target(generic_stage_target): |
142 |
+ |
143 |
+from catalyst.support import (CatalystError, normpath, |
144 |
+ touch, cmd, list_bashify) |
145 |
+ |
146 |
+from catalyst.base.stagebase import StageBase |
147 |
+ |
148 |
+ |
149 |
+class grp_target(StageBase): |
150 |
""" |
151 |
The builder class for GRP (Gentoo Reference Platform) builds. |
152 |
""" |
153 |
@@ -32,7 +39,7 @@ class grp_target(generic_stage_target): |
154 |
self.required_values.append("grp/"+x+"/packages") |
155 |
self.required_values.append("grp/"+x+"/type") |
156 |
|
157 |
- generic_stage_target.__init__(self,spec,addlargs) |
158 |
+ StageBase.__init__(self,spec,addlargs) |
159 |
|
160 |
def set_target_path(self): |
161 |
self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+"/") |
162 |
@@ -62,16 +69,15 @@ class grp_target(generic_stage_target): |
163 |
raise CatalystError,"GRP build aborting due to error." |
164 |
|
165 |
def set_use(self): |
166 |
- generic_stage_target.set_use(self) |
167 |
- if "BINDIST" in self.settings: |
168 |
- if "use" in self.settings: |
169 |
- self.settings["use"].append("bindist") |
170 |
- else: |
171 |
- self.settings["use"]=["bindist"] |
172 |
+ StageBase.set_use(self) |
173 |
+ if "use" in self.settings: |
174 |
+ self.settings["use"].append("bindist") |
175 |
+ else: |
176 |
+ self.settings["use"]=["bindist"] |
177 |
|
178 |
def set_mounts(self): |
179 |
- self.mounts.append("/tmp/grp") |
180 |
- self.mountmap["/tmp/grp"]=self.settings["target_path"] |
181 |
+ self.mounts.append("/tmp/grp") |
182 |
+ self.mountmap["/tmp/grp"]=self.settings["target_path"] |
183 |
|
184 |
def generate_digests(self): |
185 |
for pkgset in self.settings["grp"]: |
186 |
@@ -108,7 +114,7 @@ class grp_target(generic_stage_target): |
187 |
self.gen_digest_file(normpath(destdir+"/"+i)) |
188 |
|
189 |
def set_action_sequence(self): |
190 |
- self.settings["action_sequence"]=["unpack","unpack_snapshot",\ |
191 |
+ self.settings["action_sequence"]=["unpack","unpack_snapshot",\ |
192 |
"config_profile_link","setup_confdir","portage_overlay","bind","chroot_setup",\ |
193 |
"setup_environment","run_local","unbind",\ |
194 |
"generate_digests","clear_autoresume"] |
195 |
|
196 |
diff --git a/catalyst/targets/livecd_stage1_target.py b/catalyst/targets/livecd_stage1_target.py |
197 |
index 6273c9e..a19f4ac 100644 |
198 |
--- a/catalyst/targets/livecd_stage1_target.py |
199 |
+++ b/catalyst/targets/livecd_stage1_target.py |
200 |
@@ -3,10 +3,17 @@ LiveCD stage1 target |
201 |
""" |
202 |
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. |
203 |
|
204 |
-from catalyst.support import * |
205 |
-from generic_stage_target import * |
206 |
+import os |
207 |
+import types |
208 |
+import string |
209 |
|
210 |
-class livecd_stage1_target(generic_stage_target): |
211 |
+from catalyst.support import (normpath, |
212 |
+ touch, cmd) |
213 |
+ |
214 |
+from catalyst.base.stagebase import StageBase |
215 |
+ |
216 |
+ |
217 |
+class livecd_stage1_target(StageBase): |
218 |
""" |
219 |
Builder class for LiveCD stage1. |
220 |
""" |
221 |
@@ -15,7 +22,7 @@ class livecd_stage1_target(generic_stage_target): |
222 |
self.valid_values=self.required_values[:] |
223 |
|
224 |
self.valid_values.extend(["livecd/use"]) |
225 |
- generic_stage_target.__init__(self,spec,addlargs) |
226 |
+ StageBase.__init__(self,spec,addlargs) |
227 |
|
228 |
def set_action_sequence(self): |
229 |
self.settings["action_sequence"]=["unpack","unpack_snapshot",\ |
230 |
@@ -45,7 +52,7 @@ class livecd_stage1_target(generic_stage_target): |
231 |
self.settings["spec_prefix"]="livecd" |
232 |
|
233 |
def set_use(self): |
234 |
- generic_stage_target.set_use(self) |
235 |
+ StageBase.set_use(self) |
236 |
if "use" in self.settings: |
237 |
self.settings["use"].append("livecd") |
238 |
if "BINDIST" in self.settings: |
239 |
@@ -56,7 +63,7 @@ class livecd_stage1_target(generic_stage_target): |
240 |
self.settings["use"].append("bindist") |
241 |
|
242 |
def set_packages(self): |
243 |
- generic_stage_target.set_packages(self) |
244 |
+ StageBase.set_packages(self) |
245 |
if self.settings["spec_prefix"]+"/packages" in self.settings: |
246 |
if type(self.settings[self.settings["spec_prefix"]+"/packages"]) == types.StringType: |
247 |
self.settings[self.settings["spec_prefix"]+"/packages"] = \ |
248 |
@@ -68,7 +75,7 @@ class livecd_stage1_target(generic_stage_target): |
249 |
if type(self.settings["pkgcache_path"]) != types.StringType: |
250 |
self.settings["pkgcache_path"]=normpath(string.join(self.settings["pkgcache_path"])) |
251 |
else: |
252 |
- generic_stage_target.set_pkgcache_path(self) |
253 |
+ StageBase.set_pkgcache_path(self) |
254 |
|
255 |
def register(foo): |
256 |
foo.update({"livecd-stage1":livecd_stage1_target}) |
257 |
|
258 |
diff --git a/catalyst/targets/livecd_stage2_target.py b/catalyst/targets/livecd_stage2_target.py |
259 |
index 11b1219..e7ae212 100644 |
260 |
--- a/catalyst/targets/livecd_stage2_target.py |
261 |
+++ b/catalyst/targets/livecd_stage2_target.py |
262 |
@@ -3,11 +3,14 @@ LiveCD stage2 target, builds upon previous LiveCD stage1 tarball |
263 |
""" |
264 |
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. |
265 |
|
266 |
-import os,string,types,stat,shutil |
267 |
-from catalyst.support import * |
268 |
-from generic_stage_target import * |
269 |
+import os |
270 |
|
271 |
-class livecd_stage2_target(generic_stage_target): |
272 |
+from catalyst.support import (normpath, file_locate, CatalystError, cmd, |
273 |
+ read_from_clst, touch) |
274 |
+from catalyst.base.stagebase import StageBase |
275 |
+ |
276 |
+ |
277 |
+class livecd_stage2_target(StageBase): |
278 |
""" |
279 |
Builder class for a LiveCD stage2 build. |
280 |
""" |
281 |
@@ -26,7 +29,7 @@ class livecd_stage2_target(generic_stage_target): |
282 |
"livecd/fstype","livecd/fsops","livecd/linuxrc","livecd/bootargs",\ |
283 |
"gamecd/conf","livecd/xdm","livecd/xsession","livecd/volid"]) |
284 |
|
285 |
- generic_stage_target.__init__(self,spec,addlargs) |
286 |
+ StageBase.__init__(self,spec,addlargs) |
287 |
if "livecd/type" not in self.settings: |
288 |
self.settings["livecd/type"] = "generic-livecd" |
289 |
|
290 |
|
291 |
diff --git a/catalyst/targets/netboot2_target.py b/catalyst/targets/netboot2_target.py |
292 |
index ea07d76..987afd8 100644 |
293 |
--- a/catalyst/targets/netboot2_target.py |
294 |
+++ b/catalyst/targets/netboot2_target.py |
295 |
@@ -3,11 +3,18 @@ netboot target, version 2 |
296 |
""" |
297 |
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. |
298 |
|
299 |
-import os,string,types |
300 |
-from catalyst.support import * |
301 |
-from generic_stage_target import * |
302 |
+import os |
303 |
+import types |
304 |
+import shutil |
305 |
+from stat import ST_UID, ST_GID, ST_MODE |
306 |
|
307 |
-class netboot2_target(generic_stage_target): |
308 |
+from catalyst.support import (CatalystError, normpath, |
309 |
+ touch, cmd, list_bashify) |
310 |
+ |
311 |
+from catalyst.base.stagebase import StageBase |
312 |
+ |
313 |
+ |
314 |
+class netboot2_target(StageBase): |
315 |
""" |
316 |
Builder class for a netboot build, version 2 |
317 |
""" |
318 |
@@ -38,7 +45,7 @@ class netboot2_target(generic_stage_target): |
319 |
except: |
320 |
raise CatalystError,"configuration error in netboot2/packages." |
321 |
|
322 |
- generic_stage_target.__init__(self,spec,addlargs) |
323 |
+ StageBase.__init__(self,spec,addlargs) |
324 |
self.set_build_kernel_vars() |
325 |
self.settings["merge_path"]=normpath("/tmp/image/") |
326 |
|
327 |
|
328 |
diff --git a/catalyst/targets/netboot_target.py b/catalyst/targets/netboot_target.py |
329 |
index ae1eb04..c880289 100644 |
330 |
--- a/catalyst/targets/netboot_target.py |
331 |
+++ b/catalyst/targets/netboot_target.py |
332 |
@@ -3,11 +3,16 @@ netboot target, version 1 |
333 |
""" |
334 |
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. |
335 |
|
336 |
-import os,string,types |
337 |
-from catalyst.support import * |
338 |
-from generic_stage_target import * |
339 |
+import os |
340 |
+import types |
341 |
|
342 |
-class netboot_target(generic_stage_target): |
343 |
+from catalyst.support import (CatalystError, normpath, |
344 |
+ cmd, list_bashify, file_locate) |
345 |
+ |
346 |
+from catalyst.base.stagebase import StageBase |
347 |
+ |
348 |
+ |
349 |
+class netboot_target(StageBase): |
350 |
""" |
351 |
Builder class for a netboot build. |
352 |
""" |
353 |
@@ -36,7 +41,7 @@ class netboot_target(generic_stage_target): |
354 |
except: |
355 |
raise CatalystError,"configuration error in netboot/packages." |
356 |
|
357 |
- generic_stage_target.__init__(self,spec,addlargs) |
358 |
+ StageBase.__init__(self,spec,addlargs) |
359 |
self.set_build_kernel_vars(addlargs) |
360 |
if "netboot/busybox_config" in addlargs: |
361 |
file_locate(self.settings, ["netboot/busybox_config"]) |
362 |
|
363 |
diff --git a/catalyst/targets/snapshot_target.py b/catalyst/targets/snapshot_target.py |
364 |
index 3289bbd..337ff1d 100644 |
365 |
--- a/catalyst/targets/snapshot_target.py |
366 |
+++ b/catalyst/targets/snapshot_target.py |
367 |
@@ -8,8 +8,8 @@ from stat import ST_UID, ST_GID, ST_MODE |
368 |
|
369 |
|
370 |
from catalyst.support import normpath, cmd |
371 |
-from catalyst.targets.targetbase import TargetBase |
372 |
-from catalyst.targets.genbase import GenBase |
373 |
+from catalyst.base.targetbase import TargetBase |
374 |
+from catalyst.base.genbase import GenBase |
375 |
|
376 |
class snapshot_target(TargetBase, GenBase): |
377 |
""" |
378 |
|
379 |
diff --git a/catalyst/targets/stage1_target.py b/catalyst/targets/stage1_target.py |
380 |
index 8d5a674..0a36432 100644 |
381 |
--- a/catalyst/targets/stage1_target.py |
382 |
+++ b/catalyst/targets/stage1_target.py |
383 |
@@ -3,10 +3,13 @@ stage1 target |
384 |
""" |
385 |
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. |
386 |
|
387 |
-from catalyst.support import * |
388 |
-from generic_stage_target import * |
389 |
+import os |
390 |
|
391 |
-class stage1_target(generic_stage_target): |
392 |
+from catalyst.support import normpath, list_to_string |
393 |
+from catalyst.base.stagebase import StageBase |
394 |
+ |
395 |
+ |
396 |
+class stage1_target(StageBase): |
397 |
""" |
398 |
Builder class for a stage1 installation tarball build. |
399 |
""" |
400 |
@@ -14,7 +17,7 @@ class stage1_target(generic_stage_target): |
401 |
self.required_values=[] |
402 |
self.valid_values=["chost"] |
403 |
self.valid_values.extend(["update_seed","update_seed_command"]) |
404 |
- generic_stage_target.__init__(self,spec,addlargs) |
405 |
+ StageBase.__init__(self,spec,addlargs) |
406 |
|
407 |
def set_stage_path(self): |
408 |
self.settings["stage_path"]=normpath(self.settings["chroot_path"]+self.settings["root_path"]) |
409 |
@@ -26,11 +29,11 @@ class stage1_target(generic_stage_target): |
410 |
print "stage1 root path is "+self.settings["root_path"] |
411 |
|
412 |
def set_cleanables(self): |
413 |
- generic_stage_target.set_cleanables(self) |
414 |
+ StageBase.set_cleanables(self) |
415 |
self.settings["cleanables"].extend([\ |
416 |
"/usr/share/zoneinfo", "/etc/portage/package*"]) |
417 |
|
418 |
- # XXX: How do these override_foo() functions differ from the ones in generic_stage_target and why aren't they in stage3_target? |
419 |
+ # XXX: How do these override_foo() functions differ from the ones in StageBase and why aren't they in stage3_target? |
420 |
|
421 |
def override_chost(self): |
422 |
if "chost" in self.settings: |
423 |
@@ -49,7 +52,7 @@ class stage1_target(generic_stage_target): |
424 |
self.settings["LDFLAGS"]=list_to_string(self.settings["ldflags"]) |
425 |
|
426 |
def set_portage_overlay(self): |
427 |
- generic_stage_target.set_portage_overlay(self) |
428 |
+ StageBase.set_portage_overlay(self) |
429 |
if "portage_overlay" in self.settings: |
430 |
print "\nWARNING !!!!!" |
431 |
print "\tUsing an portage overlay for earlier stages could cause build issues." |
432 |
|
433 |
diff --git a/catalyst/targets/stage2_target.py b/catalyst/targets/stage2_target.py |
434 |
index 94d4a1e..783d42e 100644 |
435 |
--- a/catalyst/targets/stage2_target.py |
436 |
+++ b/catalyst/targets/stage2_target.py |
437 |
@@ -3,17 +3,20 @@ stage2 target, builds upon previous stage1 tarball |
438 |
""" |
439 |
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. |
440 |
|
441 |
-from catalyst.support import * |
442 |
-from generic_stage_target import * |
443 |
+import os |
444 |
|
445 |
-class stage2_target(generic_stage_target): |
446 |
+from catalyst.support import normpath, list_to_string |
447 |
+from catalyst.base.stagebase import StageBase |
448 |
+ |
449 |
+ |
450 |
+class stage2_target(StageBase): |
451 |
""" |
452 |
Builder class for a stage2 installation tarball build. |
453 |
""" |
454 |
def __init__(self,spec,addlargs): |
455 |
self.required_values=[] |
456 |
self.valid_values=["chost"] |
457 |
- generic_stage_target.__init__(self,spec,addlargs) |
458 |
+ StageBase.__init__(self,spec,addlargs) |
459 |
|
460 |
def set_source_path(self): |
461 |
if "seedcache" in self.settings["options"] and os.path.isdir(normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root/")): |
462 |
@@ -34,7 +37,7 @@ class stage2_target(generic_stage_target): |
463 |
print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2\n") |
464 |
|
465 |
# XXX: How do these override_foo() functions differ from the ones in |
466 |
- # generic_stage_target and why aren't they in stage3_target? |
467 |
+ # StageBase and why aren't they in stage3_target? |
468 |
|
469 |
def override_chost(self): |
470 |
if "chost" in self.settings: |
471 |
@@ -53,7 +56,7 @@ class stage2_target(generic_stage_target): |
472 |
self.settings["LDFLAGS"]=list_to_string(self.settings["ldflags"]) |
473 |
|
474 |
def set_portage_overlay(self): |
475 |
- generic_stage_target.set_portage_overlay(self) |
476 |
+ StageBase.set_portage_overlay(self) |
477 |
if "portage_overlay" in self.settings: |
478 |
print "\nWARNING !!!!!" |
479 |
print "\tUsing an portage overlay for earlier stages could cause build issues." |
480 |
|
481 |
diff --git a/catalyst/targets/stage3_target.py b/catalyst/targets/stage3_target.py |
482 |
index 89edd66..28021b1 100644 |
483 |
--- a/catalyst/targets/stage3_target.py |
484 |
+++ b/catalyst/targets/stage3_target.py |
485 |
@@ -3,20 +3,20 @@ stage3 target, builds upon previous stage2/stage3 tarball |
486 |
""" |
487 |
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. |
488 |
|
489 |
-from catalyst.support import * |
490 |
-from generic_stage_target import * |
491 |
+from catalyst.base.stagebase import StageBase |
492 |
|
493 |
-class stage3_target(generic_stage_target): |
494 |
+ |
495 |
+class stage3_target(StageBase): |
496 |
""" |
497 |
Builder class for a stage3 installation tarball build. |
498 |
""" |
499 |
def __init__(self,spec,addlargs): |
500 |
self.required_values=[] |
501 |
self.valid_values=[] |
502 |
- generic_stage_target.__init__(self,spec,addlargs) |
503 |
+ StageBase.__init__(self,spec,addlargs) |
504 |
|
505 |
def set_portage_overlay(self): |
506 |
- generic_stage_target.set_portage_overlay(self) |
507 |
+ StageBase.set_portage_overlay(self) |
508 |
if "portage_overlay" in self.settings: |
509 |
print "\nWARNING !!!!!" |
510 |
print "\tUsing an overlay for earlier stages could cause build issues." |
511 |
@@ -24,7 +24,7 @@ class stage3_target(generic_stage_target): |
512 |
print "\tDont say we did not warn you\n" |
513 |
|
514 |
def set_cleanables(self): |
515 |
- generic_stage_target.set_cleanables(self) |
516 |
+ StageBase.set_cleanables(self) |
517 |
|
518 |
def register(foo): |
519 |
foo.update({"stage3":stage3_target}) |
520 |
|
521 |
diff --git a/catalyst/targets/stage4_target.py b/catalyst/targets/stage4_target.py |
522 |
index e2b8a79..0d725c7 100644 |
523 |
--- a/catalyst/targets/stage4_target.py |
524 |
+++ b/catalyst/targets/stage4_target.py |
525 |
@@ -3,10 +3,10 @@ stage4 target, builds upon previous stage3/stage4 tarball |
526 |
""" |
527 |
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. |
528 |
|
529 |
-from catalyst.support import * |
530 |
-from generic_stage_target import * |
531 |
+from catalyst.base.stagebase import StageBase |
532 |
|
533 |
-class stage4_target(generic_stage_target): |
534 |
+ |
535 |
+class stage4_target(StageBase): |
536 |
""" |
537 |
Builder class for stage4. |
538 |
""" |
539 |
@@ -18,7 +18,7 @@ class stage4_target(generic_stage_target): |
540 |
"stage4/gk_mainargs","splash_theme",\ |
541 |
"portage_overlay","stage4/rcadd","stage4/rcdel",\ |
542 |
"stage4/linuxrc","stage4/unmerge","stage4/rm","stage4/empty"]) |
543 |
- generic_stage_target.__init__(self,spec,addlargs) |
544 |
+ StageBase.__init__(self,spec,addlargs) |
545 |
|
546 |
def set_cleanables(self): |
547 |
self.settings["cleanables"]=["/var/tmp/*","/tmp/*"] |
548 |
|
549 |
diff --git a/catalyst/targets/tinderbox_target.py b/catalyst/targets/tinderbox_target.py |
550 |
index ea11d3f..1e245f2 100644 |
551 |
--- a/catalyst/targets/tinderbox_target.py |
552 |
+++ b/catalyst/targets/tinderbox_target.py |
553 |
@@ -3,10 +3,13 @@ Tinderbox target |
554 |
""" |
555 |
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. |
556 |
|
557 |
-from catalyst.support import * |
558 |
-from generic_stage_target import * |
559 |
+import os |
560 |
|
561 |
-class tinderbox_target(generic_stage_target): |
562 |
+from catalyst.support import cmd, list_bashify, CatalystError |
563 |
+from catalyst.base.stagebase import StageBase |
564 |
+ |
565 |
+ |
566 |
+class tinderbox_target(StageBase): |
567 |
""" |
568 |
Builder class for the tinderbox target |
569 |
""" |
570 |
@@ -14,7 +17,7 @@ class tinderbox_target(generic_stage_target): |
571 |
self.required_values=["tinderbox/packages"] |
572 |
self.valid_values=self.required_values[:] |
573 |
self.valid_values.extend(["tinderbox/use"]) |
574 |
- generic_stage_target.__init__(self,spec,addlargs) |
575 |
+ StageBase.__init__(self,spec,addlargs) |
576 |
|
577 |
def run_local(self): |
578 |
# tinderbox |