diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-07-16 22:18:45 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-07-16 22:18:45 +0000 |
commit | 9d91677dc51a0f6cd34c9230bbe03b1cf7f3018f (patch) | |
tree | 19370c29cddc184438d2e5123b5cc0786ef02062 | |
parent | 9162fd59679bf3c8a9c7cb2a94804087c3a3f740 (diff) | |
download | portage-9d91677dc51a0f6cd34c9230bbe03b1cf7f3018f.tar.gz portage-9d91677dc51a0f6cd34c9230bbe03b1cf7f3018f.tar.bz2 portage-9d91677dc51a0f6cd34c9230bbe03b1cf7f3018f.zip |
For unsatisfied USE dependencies, do not backtrack if only USE have to change
in order to be satisfied. Thanks to Thomas Sachau <tommy@gentoo.org> fo
reporting.
svn path=/main/trunk/; revision=13832
-rw-r--r-- | pym/_emerge/depgraph.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index c1b789966..22aa904ee 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -664,10 +664,22 @@ class depgraph(object): self._dynamic_config._runtime_pkg_mask[ dep.parent]), noiselevel=-1) else: - self._dynamic_config._runtime_pkg_mask.setdefault( - dep.parent, {})["missing dependency"] = \ - set([(dep.parent, dep.atom)]) - self._dynamic_config._need_restart = True + # Do not backtrack if only USE have to be changed in + # order to satisfy the dependency. + atom_without_use = dep.atom + if dep.atom.use: + atom_without_use = portage.dep.remove_slot(dep.atom) + if dep.atom.slot: + atom_without_use += ":" + dep.atom.slot + atom_without_use = portage.dep.Atom(atom_without_use) + dep_pkg, existing_node = \ + self._select_package(dep.root, atom_without_use, + onlydeps=dep.onlydeps) + if dep_pkg is None: + self._dynamic_config._runtime_pkg_mask.setdefault( + dep.parent, {})["missing dependency"] = \ + set([(dep.parent, dep.atom)]) + self._dynamic_config._need_restart = True return 0 # In some cases, dep_check will return deps that shouldn't |