fix the bootloader script for isolinux so that it actually makes a cfg file, remove...
authorEric Edgar <rocket@gentoo.org>
Fri, 18 Nov 2005 02:25:44 +0000 (02:25 +0000)
committerEric Edgar <rocket@gentoo.org>
Fri, 18 Nov 2005 02:25:44 +0000 (02:25 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@896 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/generic_stage_target.py
modules/livecd_stage1_target.py
targets/support/bootloader-setup.sh

index 4bffcb04bd7a2c2d476da2d0b97b40dadc0edd10..51b8ccaf545bedb58ce3f4cc5e46bd59cf0bb610 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.384 2005/11/17 22:27:13 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.385 2005/11/18 02:25:44 rocket Exp $
+
+  18 Nov 2005; Eric Edgar <rocket@gentoo.org>
+  modules/generic_stage_target.py, modules/livecd_stage1_target.py,
+  targets/support/bootloader-setup.sh:
+  fix the bootloader script for isolinux so that it actually makes a cfg file,
+  remove extra unneeded catalyst aborting print statement, reorganize rm code
+  to make sure is splits properly and is an array even from the cmdline
 
   17 Nov 2005; Chris Gianelloni <wolf31o2@gentoo.org>
   targets/support/livecdfs-update.sh:
index f356826d9b290238f7bd0fc9d5a728b46966f750..2dd0761d1ce6c8a5ec59ebe0f84684e9b4effa70 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.77 2005/11/17 22:04:26 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.78 2005/11/18 02:25:44 rocket Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -97,9 +97,7 @@ class generic_stage_target(generic_target):
                         print "Choose one of the following:",
                         for x in self.subarchmap:
                                 print x,
-                        print
-                        print
-                        print "Catalyst aborting...."
+                       print
                         sys.exit(2)
        
                print "Using target:",self.settings["target"]
@@ -146,7 +144,8 @@ class generic_stage_target(generic_target):
                self.set_fsops()
                self.set_iso()
                self.set_packages()
-               
+               self.set_rm()
+       
                # this next line checks to make sure that the specified variables exist on disk.
                #pdb.set_trace()
                file_locate(self.settings,["source_path","snapshot_path","distdir"],expand=0)
@@ -392,9 +391,12 @@ class generic_stage_target(generic_target):
                                "setup_environment","run_local","preclean","unbind","clean","capture","clear_autoresume"]
        
        def set_use(self):
-               if self.settings.has_key("use"):
+               if self.settings.has_key(self.settings["spec_prefix"]+"/use"):
                        self.settings["use"]=self.settings[self.settings["spec_prefix"]+"/use"]
                        del self.settings[self.settings["spec_prefix"]+"/use"]
+               if self.settings.has_key("use"):
+                   if type(self.settings["use"])==types.StringType:
+                       self.settings["use"]=self.settings["use"].split()
 
        def set_stage_path(self):
                        self.settings["stage_path"]=normpath(self.settings["chroot_path"])
@@ -405,6 +407,11 @@ class generic_stage_target(generic_target):
        def set_packages(self):
                pass
 
+       def set_rm(self):
+           if self.settings.has_key(self.settings["spec_prefix"]+"/rm"):
+               if type(self.settings[self.settings["spec_prefix"]+"/rm"])==types.StringType:
+                   self.settings[self.settings["spec_prefix"]+"/rm"]=self.settings[self.settings["spec_prefix"]+"/rm"].split()
+
        def set_root_path(self):
                # ROOT= variable for emerges
                self.settings["root_path"]="/"
@@ -842,8 +849,6 @@ class generic_stage_target(generic_target):
                print "Resume point detected, skipping remove operation..."
            else:
                if self.settings.has_key(self.settings["spec_prefix"]+"/rm"):
-                   if type(self.settings[self.settings["spec_prefix"]+"/rm"])==types.StringType:
-                       self.settings[self.settings["spec_prefix"]+"/rm"]=self.settings[self.settings["spec_prefix"]+"/rm"].split()
                    for x in self.settings[self.settings["spec_prefix"]+"/rm"]:
                        # we're going to shell out for all these cleaning operations,
                        # so we get easy glob handling
index 5ad116b31c8f8efc29741b608e63ea2ba14a7f19..e800e44ae26d0cb2469266d469c74447235929b0 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.17 2005/11/02 21:54:29 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.18 2005/11/18 02:25:44 rocket Exp $
 
 """
 Builder class for LiveCD stage1.
@@ -47,6 +47,9 @@ class livecd_stage1_target(generic_stage_target):
        def set_packages(self):
            generic_stage_target.set_packages(self)
            if self.settings.has_key(self.settings["spec_prefix"]+"/packages"):
+               if type(self.settings[self.settings["spec_prefix"]+"/packages"]) == types.StringType:
+                   self.settings[self.settings["spec_prefix"]+"/packages"] = \
+                       self.settings[self.settings["spec_prefix"]+"/packages"].split()
                self.settings[self.settings["spec_prefix"]+"/packages"].append("livecd-tools")
 
        def set_pkgcache_path(self):
index d988e797843cf5e6e944c01665e8f4d57404b681..65e052e1d47d3fa71f255a8719c475750f24c658 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/bootloader-setup.sh,v 1.14 2005/10/17 17:11:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/bootloader-setup.sh,v 1.15 2005/11/18 02:25:44 rocket Exp $
 . ${clst_sharedir}/targets/support/functions.sh
 . ${clst_sharedir}/targets/support/filesystem-functions.sh
 
@@ -124,11 +124,13 @@ case ${clst_mainarch} in
                mv $1/boot/${x}{,.igz} $1/boot/efi/boot
                ;;
        x86|amd64)
-               if [ -e $1/boot/isolinux.bin ]
+               if [ -e $1/isolinux/isolinux.bin ]
                then
+                       mv $1/boot/* $1/isolinux
+                       rmdir $1/boot
                        # the rest of this function sets up the config file for isolinux
-                       icfg=$1/boot/isolinux.cfg
-                       kmsg=$1/boot/kernels.msg
+                       icfg=$1/isolinux/isolinux.cfg
+                       kmsg=$1/isolinux/kernels.msg
                        echo "default ${first}" > ${icfg}
                        echo "timeout 150" >> ${icfg}
                        echo "prompt 1" >> ${icfg}
@@ -172,7 +174,7 @@ case ${clst_mainarch} in
                                echo "   ${x}-nofb" >> ${kmsg}
                        done
 
-                       if [ -f $1/boot/memtest86 ]
+                       if [ -f $1/isolinux/memtest86 ]
                        then
                                echo >> $icfg
                                echo "   memtest86" >> $kmsg