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 513-523
Link Here
|
513 |
myeb=portage.db[portage.root]["porttree"].dep_bestmatch(mydep2) |
514 |
myeb=portage.db[portage.root]["porttree"].dep_bestmatch(mydep2) |
514 |
if not myeb: |
515 |
if not myeb: |
515 |
if not mykey: |
516 |
if not mykey: |
516 |
print "\n!!! Error: couldn't find match for",mydep |
517 |
raise GenericPortageError("couldn't find match for"+mydep) |
|
|
518 |
#print "\n!!! Error: couldn't find match for",mydep |
517 |
else: |
519 |
else: |
518 |
print "\n!!! Error: couldn't find match for",mydep,"in",mykey |
520 |
raise GenericPortageError("couldn't find match for "+mydep+" in "+mykey) |
|
|
521 |
#print "\n!!! Error: couldn't find match for",mydep,"in",mykey |
519 |
print |
522 |
print |
520 |
sys.exit(1) |
523 |
#sys.exit(1) |
521 |
#return None |
524 |
#return None |
522 |
|
525 |
|
523 |
if mydep[0]=="!": |
526 |
if mydep[0]=="!": |
Lines 1293-1300
Link Here
|
1293 |
print "\b\b ...done!" |
1296 |
print "\b\b ...done!" |
1294 |
elif myaction=="world": |
1297 |
elif myaction=="world": |
1295 |
print "Calculating world dependencies ", |
1298 |
print "Calculating world dependencies ", |
|
|
1299 |
#check world entries first |
1300 |
#if listed ebuild cannot be found just omit it and continue |
1301 |
worldlist=getlist("world") |
1302 |
for myline in worldlist: |
1303 |
try: |
1304 |
#we don't want to make harakiri on stale ebuilds here |
1305 |
mydepgraph.match(myline,mykey="update (likely old /var/db/pkg entry)") |
1306 |
except GenericPortageError: |
1307 |
type, value = sys.exc_info()[:2] |
1308 |
value.report() |
1309 |
print "commenting out this entry for now. Please correct your /var/cache/ebd/world!!!" |
1310 |
worldFile=portage.root+'/var/cache/edb/world' |
1311 |
sin,sout,serr=os.popen3('mv '+worldFile+' '+worldFile+'-orig') |
1312 |
serrLines=serr.readlines() |
1313 |
sin,sout,serr=os.popen3('sed -e "s:'+myline+':#'+myline+':" '+worldFile+'-orig >'+worldFile) |
1314 |
serrLines.append(serr.readlines()) |
1315 |
serrLines=portage.flatten(serrLines) |
1316 |
if serrLines: |
1317 |
print "!!! too bad, cannot update",worldFile,": ",serrLines |
1318 |
sys.exit(1) |
1319 |
|
1320 |
|
1296 |
mydepgraph.syscreate(getworldlist()) |
1321 |
mydepgraph.syscreate(getworldlist()) |
1297 |
print "\b\b ...done!" |
1322 |
sys.stdout.write("\b\b ...done!") |
1298 |
else: |
1323 |
else: |
1299 |
if not myfiles: |
1324 |
if not myfiles: |
1300 |
post_emerge() |
1325 |
post_emerge() |