summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-06-21 00:57:59 -0700
committerZac Medico <zmedico@gentoo.org>2011-06-21 00:57:59 -0700
commitbd3a6386eb50fdab72f092a4c0585ef152c7019e (patch)
tree2bc9bd28b756d19ae7f4c83b53d34be5c0d3e721
parent96ab3f8e703138bbbda0c50bb05998281207a4d4 (diff)
downloadportage-bd3a6386eb50fdab72f092a4c0585ef152c7019e.tar.gz
portage-bd3a6386eb50fdab72f092a4c0585ef152c7019e.tar.bz2
portage-bd3a6386eb50fdab72f092a4c0585ef152c7019e.zip
extract_affecting_use: less strict for installed
-rw-r--r--pym/_emerge/depgraph.py8
-rw-r--r--pym/_emerge/resolver/circular_dependency.py10
2 files changed, 14 insertions, 4 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 80409b0d3..c22215ba2 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2668,8 +2668,12 @@ class depgraph(object):
affecting_use = set()
for dep_str in dep_strings:
- affecting_use.update(extract_affecting_use(dep_str, atom,
- eapi=node.metadata["EAPI"]))
+ try:
+ affecting_use.update(extract_affecting_use(
+ dep_str, atom, eapi=node.metadata["EAPI"]))
+ except InvalidDependString:
+ if not node.installed:
+ raise
#Don't show flags as 'affecting' if the user can't change them,
affecting_use.difference_update(node.use.mask, \
diff --git a/pym/_emerge/resolver/circular_dependency.py b/pym/_emerge/resolver/circular_dependency.py
index 08dd5c55f..aabc174f2 100644
--- a/pym/_emerge/resolver/circular_dependency.py
+++ b/pym/_emerge/resolver/circular_dependency.py
@@ -6,6 +6,7 @@ from __future__ import print_function
from itertools import chain
from portage.dep import use_reduce, extract_affecting_use, check_required_use, get_required_use_flags
+from portage.exception import InvalidDependString
from portage.output import colorize
from _emerge.DepPrioritySatisfiedRange import DepPrioritySatisfiedRange
@@ -112,8 +113,13 @@ class circular_dependency_handler(object):
parent_atom = atom.unevaluated_atom
break
- affecting_use = extract_affecting_use(dep, parent_atom,
- eapi=parent.metadata["EAPI"])
+ try:
+ affecting_use = extract_affecting_use(dep, parent_atom,
+ eapi=parent.metadata["EAPI"])
+ except InvalidDependString:
+ if not parent.installed:
+ raise
+ affecting_use = set()
# Make sure we don't want to change a flag that is
# a) in use.mask or use.force