summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-12-15 18:55:53 -0800
committerZac Medico <zmedico@gentoo.org>2010-12-16 01:07:18 -0800
commitf09d9619bcbc0f9f1a6fa2008415e99eb0fd030b (patch)
tree5b95fd650102076ad06e6f32b6a523fe0d5f96e8
parent718b66431a21ea7586de755de0327e4c95afcb37 (diff)
downloadportage-f09d9619bcbc0f9f1a6fa2008415e99eb0fd030b.tar.gz
portage-f09d9619bcbc0f9f1a6fa2008415e99eb0fd030b.tar.bz2
portage-f09d9619bcbc0f9f1a6fa2008415e99eb0fd030b.zip
slot_conflict_handler: fix for bug #348389
This fixes a broken assumption about USE dep matching behavior, since commit 766988aa56bb1bbd2796f96946e62ed78cdf259 introduced stricter IUSE matching by using Atom.unevaluated_atom for IUSE checks (thus changing behavior in cases where conditional USE dependencies disappear upon evaluation).
-rw-r--r--pym/_emerge/resolver/slot_collision.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/pym/_emerge/resolver/slot_collision.py b/pym/_emerge/resolver/slot_collision.py
index c51b9f734..0f4c6a53f 100644
--- a/pym/_emerge/resolver/slot_collision.py
+++ b/pym/_emerge/resolver/slot_collision.py
@@ -231,14 +231,23 @@ class slot_conflict_handler(object):
collision_reasons[("version", sub_type)] = atoms
elif not atom_set.findAtomForPackage(other_pkg, \
modified_use=_pkg_use_enabled(other_pkg)):
- #Use conditionals not met.
- violated_atom = atom.violated_conditionals(_pkg_use_enabled(other_pkg), \
- other_pkg.iuse.is_valid_flag)
- for flag in violated_atom.use.enabled.union(violated_atom.use.disabled):
- atoms = collision_reasons.get(("use", flag), set())
- atoms.add((ppkg, atom, other_pkg))
- collision_reasons[("use", flag)] = atoms
- num_all_specific_atoms += 1
+ missing_iuse = other_pkg.iuse.get_missing_iuse(
+ atom.unevaluated_atom.use.required)
+ if missing_iuse:
+ for flag in missing_iuse:
+ atoms = collision_reasons.get(("use", flag), set())
+ atoms.add((ppkg, atom, other_pkg))
+ collision_reasons[("use", flag)] = atoms
+ num_all_specific_atoms += 1
+ else:
+ #Use conditionals not met.
+ violated_atom = atom.violated_conditionals(_pkg_use_enabled(other_pkg), \
+ other_pkg.iuse.is_valid_flag)
+ for flag in violated_atom.use.enabled.union(violated_atom.use.disabled):
+ atoms = collision_reasons.get(("use", flag), set())
+ atoms.add((ppkg, atom, other_pkg))
+ collision_reasons[("use", flag)] = atoms
+ num_all_specific_atoms += 1
msg.append(" pulled in by\n")