more livecd goodness
authorDaniel Robbins <drobbins@gentoo.org>
Fri, 9 Jan 2004 22:35:05 +0000 (22:35 +0000)
committerDaniel Robbins <drobbins@gentoo.org>
Fri, 9 Jan 2004 22:35:05 +0000 (22:35 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@121 d1e1f19c-881f-0410-ab34-b69fee027534

examples/isolinux-2.08-cdtar.tar.bz2 [new file with mode: 0644]
examples/x86-livecd-stage3-runscript.sh
modules/targets.py

diff --git a/examples/isolinux-2.08-cdtar.tar.bz2 b/examples/isolinux-2.08-cdtar.tar.bz2
new file mode 100644 (file)
index 0000000..681bdfe
Binary files /dev/null and b/examples/isolinux-2.08-cdtar.tar.bz2 differ
index 5a0ea431d4b743a7766625e83d165c8abeb1c8fe..ce6dfea3503764fb9e94a60daa388d95ed09283d 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/examples/Attic/x86-livecd-stage3-runscript.sh,v 1.2 2004/01/09 01:12:25 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/examples/Attic/x86-livecd-stage3-runscript.sh,v 1.3 2004/01/09 22:35:05 drobbins Exp $
 
 die() {
        echo "$1"
@@ -40,7 +40,7 @@ cdroot_setup)
        
        cdtar=$clst_livecd_stage3_cdtar
        [ "$cdtar" = "" ] && die "No livecd-stage3/cdtar specified (required)"
-       tar xpvf $cdtar -C $clst_cdroot_path || die "Couldn't extract cdtar $cdtar"
+       tar xjpvf $cdtar -C $clst_cdroot_path || die "Couldn't extract cdtar $cdtar"
        if [ "$clst_boot_kernel" = "" ]
        then
                echo "No boot/kernel setting defined, exiting."
index 5960236536cba686f6c92d54a956a9ad18246bbe..14dffbd342bc8f3a84490f997816b84eb18f9804 100644 (file)
@@ -256,7 +256,6 @@ class generic_stage_target(generic_target):
                except CatalystError:
                        self.unbind()
                        raise CatalystError,"Stage build aborting due to error."
-                       pass
 
        def run(self):
                self.dir_setup()
@@ -287,6 +286,8 @@ class generic_stage_target(generic_target):
                        self.clean()
                if self.settings["target"] in ["stage1","stage2","stage3","livecd-stage1","livecd-stage2"]:
                        self.capture()
+               if self.settings["target"] in ["livecd-stage3"]:
+                       self.cdroot_setup()
                        
 class snapshot_target(generic_target):
        def __init__(self,myspec,addlargs):
@@ -428,6 +429,23 @@ class livecd_stage3_target(generic_stage_target):
                self.valid_values.append("livecd-stage3/cdtar","livecd-stage3/clean")
                generic_stage_target.__init__(self,spec,addlargs)
 
+       def run_local(self):
+               try:
+                       cmd(self.settings["livecd-stage3/runscript"]+" run","runscript failed")
+               except CatalystError:
+                       self.unbind()
+                       raise CatalystError,"Stage build aborting due to error."
+
+       def preclean(self):
+               try:
+                       cmd(self.settings["livecd-stage3/runscript"]+" preclean","preclean runscript failed.")
+               except:
+                       self.unbind()
+                       raise
+
+       def cdroot_setup(self):
+               cmd(self.settings["livecd-stage3/runscript"]+" cdroot_setup","preclean runscript failed.")
+
 def register(foo):
        foo.update({"stage1":stage1_target,"stage2":stage2_target,"stage3":stage3_target,
        "grp":grp_target,"livecd-stage1":livecd_stage1_target,