From a8ac014ee7c32f58a82610892a4341fb3c4b8d8a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 21 Jul 2008 02:39:05 +0000 Subject: Fix breakage in the depclean/prune unsatisfied deps handling. svn path=/main/trunk/; revision=11154 --- pym/_emerge/__init__.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'pym/_emerge') diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index a6bf4f021..85e8c8bda 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -4121,6 +4121,7 @@ class depgraph(object): self._circular_deps_for_display = None self._dep_stack = [] self._unsatisfied_deps = [] + self._initially_unsatisfied_deps = [] self._ignored_deps = [] self._required_set_names = set(["system", "world"]) self._select_atoms = self._select_atoms_highest_available @@ -5560,7 +5561,7 @@ class depgraph(object): dep = self._unsatisfied_deps.pop() matches = vardb.match_pkgs(dep.atom) if not matches: - # Initially unsatisfied. + self._initially_unsatisfied_deps.append(dep) continue # An scheduled installation broke a deep dependency. # Add the installed package to the graph so that it @@ -11604,17 +11605,17 @@ def action_depclean(settings, trees, ldpath_mtimes, if not success: return 1 - unresolveable = [] - for dep in resolver._unsatisfied_deps: - if isinstance(Package, dep.parent): - unresolveable.append(dep) + unresolveable = set() + for dep in resolver._initially_unsatisfied_deps: + if isinstance(dep.parent, Package): + unresolveable.add((dep.atom, dep.parent.cpv)) if unresolveable and not allow_missing_deps: print "Dependencies could not be completely resolved due to" print "the following required packages not being installed:" print - for dep in unresolveable: - print dep.atom, "required by", str(dep.parent) + for atom, parent in unresolveable: + print atom, "required by", str(parent) if unresolveable and not allow_missing_deps: print print "Have you forgotten to run " + good("`emerge --update --newuse --deep world`") + " prior to" -- cgit v1.2.3-1-g7c22