Lines 3289-3308
Link Here
|
3289 |
if not "--pretend" in myopts: #just check pretend, since --ask implies pretend |
3289 |
if not "--pretend" in myopts: #just check pretend, since --ask implies pretend |
3290 |
emergelog(xterm_titles, " >>> depclean") |
3290 |
emergelog(xterm_titles, " >>> depclean") |
3291 |
|
3291 |
|
3292 |
remaining_atoms = worldlist + syslist |
|
|
3293 |
unresolveable = set() |
3294 |
|
3295 |
if "--quiet" not in myopts: |
3292 |
if "--quiet" not in myopts: |
3296 |
print "\nCalculating dependencies ", |
3293 |
print "\nCalculating dependencies ", |
3297 |
|
3294 |
|
|
|
3295 |
remaining_atoms = [[atom, 'world'] for atom in worldlist if vardb.match(atom)] |
3296 |
remaining_atoms += [[atom, 'system'] for atom in syslist if vardb.match(atom)] |
3297 |
unresolveable = {} |
3298 |
|
3298 |
while remaining_atoms: |
3299 |
while remaining_atoms: |
3299 |
atom = remaining_atoms.pop() |
3300 |
atom, parent = remaining_atoms.pop() |
3300 |
if atom in unresolveable: |
|
|
3301 |
continue |
3302 |
pkgs = vardb.match(atom) |
3301 |
pkgs = vardb.match(atom) |
3303 |
if not pkgs: |
3302 |
if not pkgs: |
3304 |
if not atom.startswith("!"): |
3303 |
if not atom.startswith("!"): |
3305 |
unresolveable.add(atom) |
3304 |
if atom in unresolveable: |
|
|
3305 |
unresolveable[atom].append(parent) |
3306 |
else: |
3307 |
unresolveable[atom] = [parent] |
3306 |
continue |
3308 |
continue |
3307 |
# Could put slot checking here to ensure that there aren't two |
3309 |
# Could put slot checking here to ensure that there aren't two |
3308 |
# packages with the same slot... |
3310 |
# packages with the same slot... |
Lines 3318-3336
Link Here
|
3318 |
success, atoms = portage.dep_check(depstr, emptydb, settings, |
3320 |
success, atoms = portage.dep_check(depstr, emptydb, settings, |
3319 |
myuse=usedef, trees=trees, myroot=settings["ROOT"]) |
3321 |
myuse=usedef, trees=trees, myroot=settings["ROOT"]) |
3320 |
if not success: |
3322 |
if not success: |
3321 |
print depstr |
3323 |
print "\n\n" |
3322 |
print "Something's probably wrong with ^^^" |
3324 |
print "Error occurred while processing",pkg |
3323 |
print "("+str(atoms)+"?)" |
3325 |
print str(atoms) |
3324 |
print "Bye!" |
|
|
3325 |
return |
3326 |
return |
3326 |
remaining_atoms.extend(atoms) |
3327 |
for atom in atoms: |
|
|
3328 |
remaining_atoms.append((atom, pkg)) |
3327 |
|
3329 |
|
3328 |
if "--quiet" not in myopts: |
3330 |
if "--quiet" not in myopts: |
3329 |
print "\b\b... done!" |
3331 |
print "\b\b... done!\n" |
3330 |
|
3332 |
|
3331 |
if unresolveable: |
3333 |
if unresolveable: |
3332 |
print "The following are required but not installed:" |
3334 |
print "Dependencies could not be completely resolved due to" |
3333 |
print "* "+"\n* ".join(unresolveable) |
3335 |
print "the following required packages not being installed:" |
|
|
3336 |
print |
3337 |
for atom in unresolveable: |
3338 |
print atom, "required by", " ".join(unresolveable[atom]) |
3339 |
print |
3334 |
return |
3340 |
return |
3335 |
|
3341 |
|
3336 |
cleanlist = [pkg for pkg in vardb.cpv_all() if not fakedb.cpv_exists(pkg)] |
3342 |
cleanlist = [pkg for pkg in vardb.cpv_all() if not fakedb.cpv_exists(pkg)] |
Lines 3338-3344
Link Here
|
3338 |
if len(cleanlist): |
3344 |
if len(cleanlist): |
3339 |
unmerge(settings, myopts, vartree, "unmerge", cleanlist, ldpath_mtimes) |
3345 |
unmerge(settings, myopts, vartree, "unmerge", cleanlist, ldpath_mtimes) |
3340 |
|
3346 |
|
3341 |
print |
|
|
3342 |
print "Packages installed: "+str(len(myvarlist)) |
3347 |
print "Packages installed: "+str(len(myvarlist)) |
3343 |
print "Packages in world: "+str(len(worldlist)) |
3348 |
print "Packages in world: "+str(len(worldlist)) |
3344 |
print "Packages in system: "+str(len(syslist)) |
3349 |
print "Packages in system: "+str(len(syslist)) |