--- emerge-1.9.9 Mon May 6 23:26:13 2002 +++ emerge Mon May 6 23:26:31 2002 @@ -3,6 +3,7 @@ from os.path import walk, splitext, exists, basename, dirname import sys +from portage_exceptions import * import output from output import * import portage @@ -528,11 +529,13 @@ myeb=portage.db[portage.root]["porttree"].dep_bestmatch(mydep2) if not myeb: if not mykey: - print "\n!!! Error: couldn't find match for",mydep + raise GenericPortageError("couldn't find match for"+mydep) + #print "\n!!! Error: couldn't find match for",mydep else: - print "\n!!! Error: couldn't find match for",mydep,"in",mykey + raise GenericPortageError("couldn't find match for "+mydep+" in "+mykey) + #print "\n!!! Error: couldn't find match for",mydep,"in",mykey print - sys.exit(1) + #sys.exit(1) #return None if mydep[0]=="!": @@ -1195,6 +1198,26 @@ print "\b\b ...done!" elif myaction=="world": print "Calculating world dependencies ", + #check world entries first + #if listed ebuild cannot be found just omit it and continue + worldlist=getlist("world") + for myline in worldlist: + try: + #we don't want to make harakiri on stale ebuilds here + mydepgraph.match(myline,mykey="update (likely old /var/db/pkg entry)") + except GenericPortageError,e: + e.report() + print "commenting out this entry for now... \nPlease bring your system to a consistent state!!!" + worldFileName=portage.root+'/var/cache/edb/world' + worldFileLines=file(worldFileName).readlines() + os.rename(worldFileName,worldFileName+"-orig") + worldFile=file(worldFileName,"w") + for line in worldFileLines: + if line.strip() != myline:worldFile.write(line) + else:worldFile.write("#"+line) + worldFile.close() + #to assure that file is changed at this point + if not mydepgraph.syscreate(getworldlist()): sys.exit(1) print "\b\b ...done!"