diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-04-13 21:49:52 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-04-13 21:49:52 +0000 |
commit | b4b74389347d9a9946655663d31a76864ad5e44e (patch) | |
tree | c3680809dd9725f4976503330ba66849ab7df8c8 | |
parent | 90526349c485329fc40daf9b8a144a94646b4e06 (diff) | |
download | portage-b4b74389347d9a9946655663d31a76864ad5e44e.tar.gz portage-b4b74389347d9a9946655663d31a76864ad5e44e.tar.bz2 portage-b4b74389347d9a9946655663d31a76864ad5e44e.zip |
To optimize consistency of atom selections, add all of the root packages
to the graph before processing any dependencies.
svn path=/main/trunk/; revision=9874
-rw-r--r-- | pym/_emerge/__init__.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 13dfa8985..e51534fe6 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -2388,6 +2388,7 @@ class depgraph(object): while args: arg = args.pop() for atom in arg.set: + self.spinner.update() atom_cp = portage.dep_getkey(atom) try: pprovided = pprovideddict.get(portage.dep_getkey(atom)) @@ -2438,16 +2439,12 @@ class depgraph(object): dep = Dependency(atom=atom, onlydeps=onlydeps, root=myroot, parent=arg) - self._dep_stack.append(dep) # Add the selected package to the graph as soon as possible # so that later dep_check() calls can use it as feedback # for making more consistent atom selections. if not self._add_pkg(pkg, dep.parent, priority=dep.priority, depth=dep.depth): - return 0, myfavorites - - if not self._create_graph(): if isinstance(arg, SetArg): sys.stderr.write(("\n\n!!! Problem resolving " + \ "dependencies for %s from %s\n") % \ @@ -2456,6 +2453,7 @@ class depgraph(object): sys.stderr.write(("\n\n!!! Problem resolving " + \ "dependencies for %s\n") % atom) return 0, myfavorites + except portage.exception.MissingSignature, e: portage.writemsg("\n\n!!! A missing gpg signature is preventing portage from calculating the\n") portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n") @@ -2477,6 +2475,11 @@ class depgraph(object): print >> sys.stderr, "!!!", str(e), getattr(e, "__module__", None) raise + # Now that the root packages have been added to the graph, + # process the dependencies. + if not self._create_graph(): + return 0, myfavorites + missing=0 if "--usepkgonly" in self.myopts: for xs in self.digraph.all_nodes(): |