bug #59681 fixed
authorJohn P. Davis <zhen@gentoo.org>
Thu, 16 Sep 2004 05:53:50 +0000 (05:53 +0000)
committerJohn P. Davis <zhen@gentoo.org>
Thu, 16 Sep 2004 05:53:50 +0000 (05:53 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@437 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/catalyst_support.py
targets/livecd-stage2/unmerge.sh [new file with mode: 0644]

index d2b536f9e81665e9b1970f0af17dd7dad522a6ea..6f9c3c61901e77f2fbcdc9c9bfcde8fa6478fadd 100644 (file)
--- 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 <zhen@gentoo.org> 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 <zhen@gentoo.org> catalyst,
   livecd/runscript-support/livecdfs-update.sh:
index f11e5ee5f36a6bb6f531539c418e872e9b2fa8da..474b08714171401fff2b7ad3ee865a5cda473856 100644 (file)
@@ -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 (file)
index 0000000..bb4246a
--- /dev/null
@@ -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