From 68311bda7d1987a6704359e5eb002cb5d3b0919f Mon Sep 17 00:00:00 2001 From: "John P. Davis" Date: Thu, 16 Sep 2004 05:53:50 +0000 Subject: [PATCH] bug #59681 fixed git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@437 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 7 ++++++- modules/catalyst_support.py | 20 ++++++++++++++++---- targets/livecd-stage2/unmerge.sh | 8 ++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 targets/livecd-stage2/unmerge.sh diff --git a/ChangeLog b/ChangeLog index d2b536f9..6f9c3c61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for gentoo/src/catalyst # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.83 2004/09/13 14:27:07 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.84 2004/09/16 05:53:50 zhen Exp $ + + 16 Sep 2004; John Davis modules/catalyst_support.py, + +targets/livecd-stage2/unmerge.sh: + bug #59681 resolved thanks to the patch from viric@vicerveza.homeunix.net! + Also, livecd-stage2 unmerge.sh added back in. 13 Sep 2004; John Davis catalyst, livecd/runscript-support/livecdfs-update.sh: diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py index f11e5ee5..474b0871 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.py @@ -1,8 +1,8 @@ # Distributed under the GNU General Public License version 2 # Copyright 2003-2004 Gentoo Technologies, Inc. -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.26 2004/07/12 14:37:45 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.27 2004/09/16 05:53:50 zhen Exp $ -import sys,string,os,types +import sys,string,os,types,re # these should never be touched required_build_targets=["generic_target","generic_stage_target"] @@ -149,7 +149,7 @@ def parse_spec(mylines): myline=mylines[pos].split() if (len(myline)==0) or (myline[0][-1] != ":"): - msg("Skipping invalid spec line "+repr(pos)) + msg("Skipping invalid spec line "+repr(pos+1)) #strip colon: myline[0]=myline[0][:-1] if len(myline)==2: @@ -199,6 +199,18 @@ def msg(mymsg,verblevel=1): if verbosity>=verblevel: print mymsg +def pathcompare(path1,path2): + # Change double slashes to slash + path1 = re.sub(r"//",r"/",path1) + path2 = re.sub(r"//",r"/",path2) + # Removing ending slash + path1 = re.sub("/$","",path1) + path2 = re.sub("/$","",path2) + + if path1 == path2: + return 1 + return 0 + def ismount(path): "enhanced to handle bind mounts" if os.path.ismount(path): @@ -208,7 +220,7 @@ def ismount(path): a.close() for line in mylines: mysplit=line.split() - if path == mysplit[1]: + if pathcompare(path,mysplit[1]): return 1 return 0 diff --git a/targets/livecd-stage2/unmerge.sh b/targets/livecd-stage2/unmerge.sh new file mode 100644 index 00000000..bb4246a0 --- /dev/null +++ b/targets/livecd-stage2/unmerge.sh @@ -0,0 +1,8 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/Attic/unmerge.sh,v 1.3 2004/09/16 05:53:50 zhen Exp $ + +$clst_CHROOT $clst_chroot_path /bin/bash << EOF + emerge -C $* +EOF +exit 0 -- 2.26.2