Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 59681 | Differences between
and this patch

Collapse All | Expand All

(-)/tmp/catalyst_support.py (-4 / +16 lines)
Lines 1-8 Link Here
1
# Distributed under the GNU General Public License version 2
1
# Distributed under the GNU General Public License version 2
2
# Copyright 2003-2004 Gentoo Technologies, Inc.
2
# Copyright 2003-2004 Gentoo Technologies, Inc.
3
# $Header: /var/www/www.gentoo.org/raw_cvs/gentoo/src/catalyst/modules/catalyst_support.py,v 1.26 2004/07/12 14:37:45 zhen Exp $
3
# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.26 2004/07/12 14:37:45 zhen Exp $
4
4
5
import sys,string,os,types
5
import sys,string,os,types,re
6
6
7
# these should never be touched
7
# these should never be touched
8
required_build_targets=["generic_target","generic_stage_target"]
8
required_build_targets=["generic_target","generic_stage_target"]
Lines 149-155 Link Here
149
			myline=mylines[pos].split()
149
			myline=mylines[pos].split()
150
			
150
			
151
			if (len(myline)==0) or (myline[0][-1] != ":"):
151
			if (len(myline)==0) or (myline[0][-1] != ":"):
152
				msg("Skipping invalid spec line "+repr(pos))
152
				msg("Skipping invalid spec line "+repr(pos+1))
153
			#strip colon:
153
			#strip colon:
154
			myline[0]=myline[0][:-1]
154
			myline[0]=myline[0][:-1]
155
			if len(myline)==2:
155
			if len(myline)==2:
Lines 199-204 Link Here
199
	if verbosity>=verblevel:
199
	if verbosity>=verblevel:
200
		print mymsg
200
		print mymsg
201
201
202
def pathcompare(path1,path2):
203
	# Change double slashes to slash
204
	path1 = re.sub(r"//",r"/",path1)
205
	path2 = re.sub(r"//",r"/",path2)
206
	# Removing ending slash
207
	path1 = re.sub("/$","",path1)
208
	path2 = re.sub("/$","",path2)
209
	
210
	if path1 == path2:
211
		return 1
212
	return 0
213
202
def ismount(path):
214
def ismount(path):
203
	"enhanced to handle bind mounts"
215
	"enhanced to handle bind mounts"
204
	if os.path.ismount(path):
216
	if os.path.ismount(path):
Lines 208-214 Link Here
208
	a.close()
220
	a.close()
209
	for line in mylines:
221
	for line in mylines:
210
		mysplit=line.split()
222
		mysplit=line.split()
211
		if path == mysplit[1]:
223
		if pathcompare(path,mysplit[1]):
212
			return 1
224
			return 1
213
	return 0
225
	return 0
214
226

Return to bug 59681