if "--quiet" not in myopts:
print "\nCalculating dependencies ",
- remaining_atoms = [(atom, 'world') for atom in worldlist if vardb.match(atom)]
- remaining_atoms += [(atom, 'system') for atom in syslist if vardb.match(atom)]
+ soft = 0
+ hard = 1
+ remaining_atoms = [(atom, 'world', hard) for atom in worldlist if vardb.match(atom)]
+ remaining_atoms += [(atom, 'system', hard) for atom in syslist if vardb.match(atom)]
unresolveable = {}
+ aux_keys = ["DEPEND", "RDEPEND", "PDEPEND"]
while remaining_atoms:
- atom, parent = remaining_atoms.pop()
+ atom, parent, priority = remaining_atoms.pop()
pkgs = vardb.match(atom)
if not pkgs:
- if not atom.startswith("!"):
+ if not atom.startswith("!") and priority == hard:
if atom in unresolveable:
unresolveable[atom].append(parent)
else:
spinner.update()
fakedb.cpv_inject(pkg)
mydb = portdb.xmatch("match-visible", "="+pkg) and portdb or vardb
+ myaux = dict(zip(aux_keys, mydb.aux_get(pkg, aux_keys)))
+ mydeps = []
if myopts.get("--with-bdeps", "y") == "y":
- depstr = " ".join(mydb.aux_get(pkg,
- ["DEPEND", "RDEPEND", "PDEPEND"]))
- else:
- depstr = " ".join(mydb.aux_get(pkg,
- ["RDEPEND", "PDEPEND"]))
+ mydeps.append((myaux["DEPEND"], soft))
+ del myaux["DEPEND"]
+ mydeps.append((" ".join(myaux.values()), hard))
usedef = vardb.aux_get(pkg, ["USE"])[0].split()
- success, atoms = portage.dep_check(depstr, emptydb, settings,
- myuse=usedef, trees=trees, myroot=settings["ROOT"])
- if not success:
- print "\n\n"
- print "Error occurred while processing",pkg
- print str(atoms)
- return
- for atom in atoms:
- remaining_atoms.append((atom, pkg))
+ for depstr, priority in mydeps:
+ success, atoms = portage.dep_check(depstr, emptydb, settings,
+ myuse=usedef, trees=trees, myroot=settings["ROOT"])
+ if not success:
+ print "\n\n"
+ print "Error occurred while processing",pkg
+ print str(atoms)
+ return
+ for atom in atoms:
+ remaining_atoms.append((atom, pkg, priority))
if "--quiet" not in myopts:
print "\b\b... done!\n"