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

Collapse All | Expand All

(-)emerge-1.9.9 (-3 / +26 lines)
Lines 3-8 Link Here
3
from os.path import walk, splitext, exists, basename, dirname
3
from os.path import walk, splitext, exists, basename, dirname
4
import sys
4
import sys
5
5
6
from portage_exceptions import *
6
import output
7
import output
7
from output import *
8
from output import *
8
import portage
9
import portage
Lines 528-538 Link Here
528
		myeb=portage.db[portage.root]["porttree"].dep_bestmatch(mydep2)
529
		myeb=portage.db[portage.root]["porttree"].dep_bestmatch(mydep2)
529
		if not myeb:
530
		if not myeb:
530
			if not mykey:
531
			if not mykey:
531
				print "\n!!! Error: couldn't find match for",mydep
532
				raise GenericPortageError("couldn't find match for"+mydep)
533
				#print "\n!!! Error: couldn't find match for",mydep
532
			else:
534
			else:
533
				print "\n!!! Error: couldn't find match for",mydep,"in",mykey
535
				raise GenericPortageError("couldn't find match for "+mydep+" in "+mykey)
536
				#print "\n!!! Error: couldn't find match for",mydep,"in",mykey
534
			print
537
			print
535
			sys.exit(1)
538
			#sys.exit(1)
536
			#return None
539
			#return None
537
540
538
		if mydep[0]=="!":
541
		if mydep[0]=="!":
Lines 1195-1200 Link Here
1195
		print "\b\b ...done!"
1198
		print "\b\b ...done!"
1196
	elif myaction=="world":
1199
	elif myaction=="world":
1197
		print "Calculating world dependencies  ",
1200
		print "Calculating world dependencies  ",
1201
		#check world entries first
1202
		#if listed ebuild cannot be found just omit it and continue
1203
		worldlist=getlist("world")
1204
		for myline in worldlist:
1205
			try:
1206
				#we don't want to make harakiri on stale ebuilds here
1207
				mydepgraph.match(myline,mykey="update (likely old /var/db/pkg entry)")
1208
			except GenericPortageError,e:
1209
				e.report()
1210
				print "commenting out this entry for now... \nPlease bring your system to a consistent state!!!"
1211
				worldFileName=portage.root+'/var/cache/edb/world'
1212
				worldFileLines=file(worldFileName).readlines()
1213
				os.rename(worldFileName,worldFileName+"-orig")
1214
				worldFile=file(worldFileName,"w")
1215
				for line in worldFileLines:
1216
					if line.strip() != myline:worldFile.write(line)
1217
					else:worldFile.write("#"+line)
1218
				worldFile.close()
1219
				#to assure that file is changed at this point
1220
1198
		if not mydepgraph.syscreate(getworldlist()):
1221
		if not mydepgraph.syscreate(getworldlist()):
1199
			sys.exit(1)
1222
			sys.exit(1)
1200
		print "\b\b ...done!"
1223
		print "\b\b ...done!"

Return to bug 1841