Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 16031
Collapse All | Expand All

(-)portage.py.orig (-12 / +12 lines)
Lines 65-71 Link Here
65
dircache={}
65
dircache={}
66
def listdir(path):
66
def listdir(path):
67
	"""List directory contents, using cache. (from dircache module; streamlined by drobbins)
67
	"""List directory contents, using cache. (from dircache module; streamlined by drobbins)
68
	Exceptions will be propogated to the caller."""
68
	Exceptions will be propagated to the caller."""
69
	try:
69
	try:
70
		cached_mtime, list = dircache[path]
70
		cached_mtime, list = dircache[path]
71
	except KeyError:
71
	except KeyError:
Lines 133-139 Link Here
133
features=[]
133
features=[]
134
134
135
def exithandler(foo,bar):
135
def exithandler(foo,bar):
136
	"""Handles ^C interupts in a sane manner"""
136
	"""Handles ^C interrupts in a sane manner"""
137
	global features,secpass
137
	global features,secpass
138
	#remove temp sandbox files
138
	#remove temp sandbox files
139
#	if (secpass==2) and ("sandbox" in features):
139
#	if (secpass==2) and ("sandbox" in features):
Lines 457-463 Link Here
457
		outfile.write("export "+x+"='"+env[x]+"'\n")
457
		outfile.write("export "+x+"='"+env[x]+"'\n")
458
	outfile.close()
458
	outfile.close()
459
	
459
	
460
	#creat /etc/csh.env for (t)csh support
460
	#create /etc/csh.env for (t)csh support
461
	outfile=open(root+"/etc/csh.env","w")
461
	outfile=open(root+"/etc/csh.env","w")
462
	outfile.write(cenvnotice)
462
	outfile.write(cenvnotice)
463
	
463
	
Lines 944-950 Link Here
944
	signal handling.  Using spawn allows our Portage signal handler
944
	signal handling.  Using spawn allows our Portage signal handler
945
	to work."""
945
	to work."""
946
946
947
	# usefull if an ebuild or so needs to get the pid of our python process
947
	# useful if an ebuild or so needs to get the pid of our python process
948
	settings["PORTAGE_MASTER_PID"]=str(os.getpid())
948
	settings["PORTAGE_MASTER_PID"]=str(os.getpid())
949
	droppriv=(droppriv and ("userpriv" in features))
949
	droppriv=(droppriv and ("userpriv" in features))
950
950
Lines 1276-1282 Link Here
1276
	settings["PKG_TMPDIR"]=settings["PORTAGE_TMPDIR"]+"/portage-pkg"
1276
	settings["PKG_TMPDIR"]=settings["PORTAGE_TMPDIR"]+"/portage-pkg"
1277
	settings["BUILDDIR"]=settings["BUILD_PREFIX"]+"/"+settings["PF"]
1277
	settings["BUILDDIR"]=settings["BUILD_PREFIX"]+"/"+settings["PF"]
1278
1278
1279
	#set up KV variable -- DEP SPEEDUP :: Don't waste time. Keep var persistant.
1279
	#set up KV variable -- DEP SPEEDUP :: Don't waste time. Keep var persistent.
1280
	if (mydo!="depend") or not settings.has_key("KV"):
1280
	if (mydo!="depend") or not settings.has_key("KV"):
1281
		mykv,err1=ExtractKernelVersion(root+"usr/src/linux")
1281
		mykv,err1=ExtractKernelVersion(root+"usr/src/linux")
1282
		if mykv:
1282
		if mykv:
Lines 1867-1873 Link Here
1867
		if val2[x][0] == '0' :
1867
		if val2[x][0] == '0' :
1868
			val2[x]='.' + val2[x]
1868
			val2[x]='.' + val2[x]
1869
1869
1870
	# extend varion numbers
1870
	# extend version numbers
1871
	if len(val2)<len(val1):
1871
	if len(val2)<len(val1):
1872
		val2.extend(["0"]*(len(val1)-len(val2)))
1872
		val2.extend(["0"]*(len(val1)-len(val2)))
1873
	elif len(val1)<len(val2):
1873
	elif len(val1)<len(val2):
Lines 1944-1950 Link Here
1944
			try:
1944
			try:
1945
				mynew=dep_opconvert(mysplit[mypos+1],myuse)
1945
				mynew=dep_opconvert(mysplit[mypos+1],myuse)
1946
			except Exception, e:
1946
			except Exception, e:
1947
				print "!!! Unable to satisfy OR dependancy:",string.join(mysplit," || ")
1947
				print "!!! Unable to satisfy OR dependency:",string.join(mysplit," || ")
1948
				raise e
1948
				raise e
1949
			mynew[0:0]=["||"]
1949
			mynew[0:0]=["||"]
1950
			newsplit.append(mynew)
1950
			newsplit.append(mynew)
Lines 2435-2441 Link Here
2435
		return
2435
		return
2436
2436
2437
	def aux_get(self,mycpv,mylist):
2437
	def aux_get(self,mycpv,mylist):
2438
		"stub code for returning auxilliary db information, such as SLOT, DEPEND, etc."
2438
		"stub code for returning auxiliary db information, such as SLOT, DEPEND, etc."
2439
		'input: "sys-apps/foo-1.0",["SLOT","DEPEND","HOMEPAGE"]'
2439
		'input: "sys-apps/foo-1.0",["SLOT","DEPEND","HOMEPAGE"]'
2440
		'return: ["0",">=sys-libs/bar-1.0","http://www.foo.com"] or [] if mycpv not found'
2440
		'return: ["0",">=sys-libs/bar-1.0","http://www.foo.com"] or [] if mycpv not found'
2441
		pass
2441
		pass
Lines 3000-3006 Link Here
3000
		return self.root+"/"+mysplit[0]+"/"+psplit[0]+"/"+mysplit[1]+".ebuild"
3000
		return self.root+"/"+mysplit[0]+"/"+psplit[0]+"/"+mysplit[1]+".ebuild"
3001
3001
3002
	def aux_get(self,mycpv,mylist,strict=0,metacachedir=None):
3002
	def aux_get(self,mycpv,mylist,strict=0,metacachedir=None):
3003
		"stub code for returning auxilliary db information, such as SLOT, DEPEND, etc."
3003
		"stub code for returning auxiliary db information, such as SLOT, DEPEND, etc."
3004
		'input: "sys-apps/foo-1.0",["SLOT","DEPEND","HOMEPAGE"]'
3004
		'input: "sys-apps/foo-1.0",["SLOT","DEPEND","HOMEPAGE"]'
3005
		'return: ["0",">=sys-libs/bar-1.0","http://www.foo.com"] or raise KeyError if error'
3005
		'return: ["0",">=sys-libs/bar-1.0","http://www.foo.com"] or raise KeyError if error'
3006
		global auxdbkeys,auxdbkeylen,dbcachedir
3006
		global auxdbkeys,auxdbkeylen,dbcachedir
Lines 3413-3419 Link Here
3413
			self.tree={}
3413
			self.tree={}
3414
	
3414
	
3415
	def populate(self):
3415
	def populate(self):
3416
		"popules the binarytree"
3416
		"populates the binarytree"
3417
		if (not os.path.isdir(self.pkgdir)):
3417
		if (not os.path.isdir(self.pkgdir)):
3418
			return 0
3418
			return 0
3419
		if (not os.path.isdir(self.pkgdir+"/All")):
3419
		if (not os.path.isdir(self.pkgdir+"/All")):
Lines 4485-4495 Link Here
4485
#create PORTAGE_TMPDIR if it doesn't exist.
4485
#create PORTAGE_TMPDIR if it doesn't exist.
4486
if not os.path.exists(settings["PORTAGE_TMPDIR"]):
4486
if not os.path.exists(settings["PORTAGE_TMPDIR"]):
4487
	print "portage: the directory specified in your PORTAGE_TMPDIR variable, \""+settings["PORTAGE_TMPDIR"]+",\""
4487
	print "portage: the directory specified in your PORTAGE_TMPDIR variable, \""+settings["PORTAGE_TMPDIR"]+",\""
4488
	print "does not exist.  Please create this directory or correct your PORTAGE_TMPDIR settting."
4488
	print "does not exist.  Please create this directory or correct your PORTAGE_TMPDIR setting."
4489
	sys.exit(1)
4489
	sys.exit(1)
4490
if not os.path.isdir(settings["PORTAGE_TMPDIR"]):
4490
if not os.path.isdir(settings["PORTAGE_TMPDIR"]):
4491
	print "portage: the directory specified in your PORTAGE_TMPDIR variable, \""+settings["PORTAGE_TMPDIR"]+",\""
4491
	print "portage: the directory specified in your PORTAGE_TMPDIR variable, \""+settings["PORTAGE_TMPDIR"]+",\""
4492
	print "is not a directory.  Please correct your PORTAGE_TMPDIR settting."
4492
	print "is not a directory.  Please correct your PORTAGE_TMPDIR setting."
4493
	sys.exit(1)
4493
	sys.exit(1)
4494
4494
4495
#getting categories from an external file now
4495
#getting categories from an external file now

Return to bug 16031