From: Eric Edgar Date: Fri, 18 Nov 2005 02:25:44 +0000 (+0000) Subject: fix the bootloader script for isolinux so that it actually makes a cfg file, remove... X-Git-Tag: CATALYST_2_0_6_916~598 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6338a50854cd321dd8c9e74c78441d9a4e563416;p=catalyst.git 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 git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@896 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index 4bffcb04..51b8ccaf 100644 --- 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 + 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 targets/support/livecdfs-update.sh: diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index f356826d..2dd0761d 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -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 diff --git a/modules/livecd_stage1_target.py b/modules/livecd_stage1_target.py index 5ad116b3..e800e44a 100644 --- a/modules/livecd_stage1_target.py +++ b/modules/livecd_stage1_target.py @@ -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): diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh index d988e797..65e052e1 100755 --- a/targets/support/bootloader-setup.sh +++ b/targets/support/bootloader-setup.sh @@ -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