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 516-526
Link Here
|
516 |
myeb=portage.db[portage.root]["porttree"].dep_bestmatch(mydep2) |
517 |
myeb=portage.db[portage.root]["porttree"].dep_bestmatch(mydep2) |
517 |
if not myeb: |
518 |
if not myeb: |
518 |
if not mykey: |
519 |
if not mykey: |
519 |
print "\n!!! Error: couldn't find match for",mydep |
520 |
raise GenericPortageError("couldn't find match for"+mydep) |
|
|
521 |
#print "\n!!! Error: couldn't find match for",mydep |
520 |
else: |
522 |
else: |
521 |
print "\n!!! Error: couldn't find match for",mydep,"in",mykey |
523 |
raise GenericPortageError("couldn't find match for "+mydep+" in "+mykey) |
|
|
524 |
#print "\n!!! Error: couldn't find match for",mydep,"in",mykey |
522 |
print |
525 |
print |
523 |
sys.exit(1) |
526 |
#sys.exit(1) |
524 |
#return None |
527 |
#return None |
525 |
|
528 |
|
526 |
if mydep[0]=="!": |
529 |
if mydep[0]=="!": |
Lines 1297-1302
Link Here
|
1297 |
print "\b\b ...done!" |
1300 |
print "\b\b ...done!" |
1298 |
elif myaction=="world": |
1301 |
elif myaction=="world": |
1299 |
print "Calculating world dependencies ", |
1302 |
print "Calculating world dependencies ", |
|
|
1303 |
#check world entries first |
1304 |
#if listed ebuild cannot be found just omit it and continue |
1305 |
worldlist=getlist("world") |
1306 |
for myline in worldlist: |
1307 |
try: |
1308 |
#we don't want to make harakiri on stale ebuilds here |
1309 |
mydepgraph.match(myline,mykey="update (likely old /var/db/pkg entry)") |
1310 |
except GenericPortageError,e: |
1311 |
e.report() |
1312 |
print "commenting out this entry for now... \nPlease bring your system to a consistent state!!!" |
1313 |
worldFileName=portage.root+'/var/cache/edb/world' |
1314 |
worldFileLines=file(worldFileName).readlines() |
1315 |
os.rename(worldFileName,worldFileName+"-orig") |
1316 |
worldFile=file(worldFileName,"w") |
1317 |
for line in worldFileLines: |
1318 |
if line.strip() != myline:worldFile.write(line) |
1319 |
else:worldFile.write("#"+line) |
1320 |
worldFile.close() |
1321 |
#to assure that file is changed at this point |
1322 |
|
1300 |
if not mydepgraph.syscreate(getworldlist()): |
1323 |
if not mydepgraph.syscreate(getworldlist()): |
1301 |
sys.exit(1) |
1324 |
sys.exit(1) |
1302 |
print "\b\b ...done!" |
1325 |
print "\b\b ...done!" |