summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-26 11:16:00 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-26 11:16:00 -0700
commit9381520de9a14880b1d74031990e81704e04c8ab (patch)
treec7681edce3c37e89a44055c336ae9c1af689fd89
parentdc65c64849ef56398e77435cc87696922e0726a1 (diff)
downloadportage-9381520de9a14880b1d74031990e81704e04c8ab.tar.gz
portage-9381520de9a14880b1d74031990e81704e04c8ab.tar.bz2
portage-9381520de9a14880b1d74031990e81704e04c8ab.zip
Fix slot_conflict_handler breakage when calling
Atom.unevaluated_atom.violated_conditionals() since in this case the parent_use argument is required.
-rw-r--r--pym/_emerge/resolver/slot_collision.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pym/_emerge/resolver/slot_collision.py b/pym/_emerge/resolver/slot_collision.py
index 77f527ffd..045c3b26b 100644
--- a/pym/_emerge/resolver/slot_collision.py
+++ b/pym/_emerge/resolver/slot_collision.py
@@ -1,6 +1,7 @@
from __future__ import print_function
from _emerge.AtomArg import AtomArg
+from _emerge.Package import Package
from _emerge.PackageArg import PackageArg
from portage.dep import check_required_use
from portage.output import colorize
@@ -256,8 +257,12 @@ class slot_conflict_handler(object):
hard_matches = set()
conditional_matches = set()
for ppkg, atom, other_pkg in parents:
+ parent_use = None
+ if isinstance(ppkg, Package):
+ parent_use = _pkg_use_enabled(ppkg)
violated_atom = atom.unevaluated_atom.violated_conditionals( \
- _pkg_use_enabled(other_pkg), other_pkg.iuse.is_valid_flag)
+ _pkg_use_enabled(other_pkg), other_pkg.iuse.is_valid_flag,
+ parent_use=parent_use)
if use in violated_atom.use.enabled.union(violated_atom.use.disabled):
hard_matches.add((ppkg, atom))
else:
@@ -467,7 +472,7 @@ class slot_conflict_handler(object):
pkg.iuse.is_valid_flag)
else:
violated_atom = atom.unevaluated_atom.violated_conditionals(_pkg_use_enabled(pkg), \
- pkg.iuse.is_valid_flag)
+ pkg.iuse.is_valid_flag, parent_use=_pkg_use_enabled(ppkg))
if pkg.installed and (violated_atom.use.enabled or violated_atom.use.disabled):
#We can't change USE of an installed package (only of an ebuild, but that is already