some livecd-stage2 updates
authorDaniel Robbins <drobbins@gentoo.org>
Wed, 7 Jan 2004 17:45:57 +0000 (17:45 +0000)
committerDaniel Robbins <drobbins@gentoo.org>
Wed, 7 Jan 2004 17:45:57 +0000 (17:45 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@114 d1e1f19c-881f-0410-ab34-b69fee027534

modules/targets.py
targets/livecd-stage2/livecd-stage2.sh

index 3312a5ce946f7e653b1539c2c76e61f8263e646a..e5cfd185ee4714db65c71983c41ba2e137b856f1 100644 (file)
@@ -78,9 +78,10 @@ class generic_stage_target(generic_target):
                if self.settings["target"] in ["grp","tinderbox"]:
                        #grp creates a directory of packages and sources rather than a compressed tarball
                        self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"]
-                       #since we have a directory here, we need to create it
-                       if not os.path.exists(self.settings["target_path"]):
-                               os.makedirs(self.settings["target_path"])
+               elif self.settings["target"] == "livecd-stage2":
+                       #we have a main directory and a tarball in this case
+                       os.makedirs(st+"/builds/"+self.settings["target_subpath"])
+                       self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"]+"/"+self.settings["target_subpath"]+".tar.bz2"
                else:
                        self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"]+".tar.bz2"
                self.settings["source_path"]=st+"/builds/"+self.settings["source_subpath"]+".tar.bz2"
@@ -99,6 +100,9 @@ class generic_stage_target(generic_target):
                if self.settings["target"]=="grp":
                        self.mounts.append("/tmp/grp")
                        self.mountmap["/tmp/grp"]=self.settings["target_path"]
+               if self.settings["target"]="livecd-stage2":
+                       self.mounts.append("/tmp/binaries")
+                       self.mountmap["/tmp/binaries"]=st+"/builds/"+self.settings["target_subpath"]+"/binaries"
                        
        def mount_safety_check(self):
                mypath=self.settings["chroot_path"]
@@ -139,6 +143,8 @@ class generic_stage_target(generic_target):
                for x in self.mounts: 
                        if not os.path.exists(self.settings["chroot_path"]+x):
                                os.makedirs(self.settings["chroot_path"]+x)
+                       if not os.path.exists(self.mountmap[x]):
+                               os.makedirs(self.mountmap[x])
                        src=self.mountmap[x]
                        retval=os.system("mount --bind "+src+" "+self.settings["chroot_path"]+x)
                        if retval!=0:
index 81bcd4411cc47887b3a6a0fac83970d0c8cbd320..b1398da7ae684ef7da0487dbcd430d28a693e0cd 100755 (executable)
@@ -1,6 +1,6 @@
 # Copyright 1999-2003 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/Attic/livecd-stage2.sh,v 1.2 2003/12/24 19:28:08 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/Attic/livecd-stage2.sh,v 1.3 2004/01/07 17:45:57 drobbins Exp $
 
 case $1 in
 enter)
@@ -30,7 +30,7 @@ run)
                else
                        emerge --noreplace $clst_ksource || exit 1
                fi
-               genkernel --no-bootsplash --kerneldir=/usr/src/linux --kernel-config=/var/tmp/$clst_kname.config --kernelpackage=/var/tmp/$clst_kname.tar.gz all || exit 1
+               genkernel --no-bootsplash --kerneldir=/usr/src/linux --kernel-config=/var/tmp/$clst_kname.config --kernelpackage=/tmp/binaries/$clst_kname.tar.gz all || exit 1
                emerge -C genkernel $clst_ksource
 EOF
                [ $? -ne 0 ] && exit 1