From 6aa64bf7a921ad5ffd100e74c09baa8f0b077e5e Mon Sep 17 00:00:00 2001 From: Eric Edgar Date: Tue, 10 Jan 2006 15:42:01 +0000 Subject: [PATCH] filter kname so - and . work git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1013 d1e1f19c-881f-0410-ab34-b69fee027534 --- modules/generic_stage_target.py | 5 +++-- targets/support/kmerge.sh | 15 ++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 9662ef18..873d71d8 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.112 2006/01/05 19:23:07 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.113 2006/01/10 15:42:01 rocket Exp $ """ This class does all of the chroot setup, copying of files, etc. It is @@ -994,9 +994,10 @@ class generic_stage_target(generic_target): # modify the current environment. This is an ugly hack that should be fixed. We need this # to use the os.system() call since we can't specify our own environ: for x in self.settings.keys(): - # "/" is replaced with "_", "-" is also replaced with "_" + # "/" is replaced with "_", "-" is also replaced with "_", "." is also replace with "_" varname="clst_"+string.replace(x,"/","_") varname=string.replace(varname,"-","_") + varname=string.replace(varname,".","_") if type(self.settings[x])==types.StringType: # prefix to prevent namespace clashes: #os.environ[varname]=self.settings[x] diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh index 38c2b5bf..ee35b682 100755 --- a/targets/support/kmerge.sh +++ b/targets/support/kmerge.sh @@ -51,8 +51,8 @@ setup_gk_args() { } genkernel_compile(){ - eval "clst_initramfs_overlay=\$clst_boot_kernel_${clst_kname}_initramfs_overlay" - eval "clst_kernel_merge=\$clst_boot_kernel_${clst_kname}_packages" + eval "clst_initramfs_overlay=\$clst_boot_kernel_${filtered_kname}_initramfs_overlay" + eval "clst_kernel_merge=\$clst_boot_kernel_${filtered_kname}_packages" setup_gk_args #echo "The GK_ARGS are" @@ -105,11 +105,16 @@ export CONFIG_PROTECT="-*" rm /etc/localtime ln -s /usr/share/zoneinfo/UTC /etc/localtime -eval "clst_kernel_use=\$clst_boot_kernel_${clst_kname}_use" + +filtered_kname=${clst_kname/-/_} +filtered_kname=${clst_kname/\//_} +filtered_kname=${filtered_kname/\./_} + +eval "clst_kernel_use=\$clst_boot_kernel_${filtered_kname}_use" export USE=$clst_kernel_use -eval "clst_kernel_gk_kernargs=\$clst_boot_kernel_${clst_kname}_gk_kernargs" -eval "clst_ksource=\$clst_boot_kernel_${clst_kname}_sources" +eval "clst_kernel_gk_kernargs=\$clst_boot_kernel_${filtered_kname}_gk_kernargs" +eval "clst_ksource=\$clst_boot_kernel_${filtered_kname}_sources" # Don't use pkgcache here, as the kernel source may get emerged with different # USE variables (and thus different patches enabled/disabled.) Also, there's no -- 2.26.2