--- emerge-orig_2002429 Mon Apr 29 23:35:24 2002 +++ emerge-orig_2002429 Tue Apr 30 01:35:53 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 @@ -513,11 +514,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]=="!": @@ -1293,8 +1296,30 @@ 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: + type, value = sys.exc_info()[:2] + value.report() + print "commenting out this entry for now. Please correct your /var/cache/ebd/world!!!" + worldFile=portage.root+'/var/cache/edb/world' + sin,sout,serr=os.popen3('mv '+worldFile+' '+worldFile+'-orig') + serrLines=serr.readlines() + sin,sout,serr=os.popen3('sed -e "s:'+myline+':#'+myline+':" '+worldFile+'-orig >'+worldFile) + serrLines.append(serr.readlines()) + serrLines=portage.flatten(serrLines) + if serrLines: + print "!!! too bad, cannot update",worldFile,": ",serrLines + sys.exit(1) + + mydepgraph.syscreate(getworldlist()) - print "\b\b ...done!" + sys.stdout.write("\b\b ...done!") else: if not myfiles: post_emerge()