summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-26 16:49:20 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-26 16:49:20 -0700
commitada7f4f6f009d2eab5d98e5e6f284a80738bb55b (patch)
treedfa60a2e3ee8e3ace33a294f3f9a0c5e72e31a25
parentf37424319b32ea3eede9ec21194622d80747848c (diff)
downloadportage-ada7f4f6f009d2eab5d98e5e6f284a80738bb55b.tar.gz
portage-ada7f4f6f009d2eab5d98e5e6f284a80738bb55b.tar.bz2
portage-ada7f4f6f009d2eab5d98e5e6f284a80738bb55b.zip
Bug #334365 - Make dep_check() less strict with respect to EAPI
constraints for installed packages since previous validation will have already marked them as invalid when necessary and now we're more interested in evaluating dependencies so that things like --depclean work as well as possible in spite of partial invalidity. Also, remove obsolete EAPI atom validation code from _expand_new_virtuals() since it's handled by use_reduce() and the Atom constructor now.
-rw-r--r--pym/portage/dep/dep_check.py29
1 files changed, 12 insertions, 17 deletions
diff --git a/pym/portage/dep/dep_check.py b/pym/portage/dep/dep_check.py
index bfbdc608e..07a38d0c5 100644
--- a/pym/portage/dep/dep_check.py
+++ b/pym/portage/dep/dep_check.py
@@ -62,21 +62,6 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
raise ParseError(
_("invalid token: '%s'") % x)
- if x.blocker and x.blocker.overlap.forbid and \
- not eapi_has_strong_blocks(eapi):
- raise ParseError(
- _("strong blocks are not allowed in EAPI %s: '%s'") % (eapi, x))
- if x.use and not eapi_has_use_deps(eapi):
- raise ParseError(
- _("use deps are not allowed in EAPI %s: '%s'") % (eapi, x))
- if x.slot and not eapi_has_slot_deps(eapi):
- raise ParseError(
- _("slot deps are not allowed in EAPI %s: '%s'") % (eapi, x))
- if x.use and (x.use.missing_enabled or x.use.missing_disabled) \
- and not eapi_has_use_dep_defaults(eapi):
- raise ParseError(
- _("use dep defaults are not allowed in EAPI %s: '%s'") % (eapi, x))
-
if repoman:
x = x._eval_qa_conditionals(use_mask, use_force)
@@ -537,12 +522,22 @@ def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None,
mytrees = trees[myroot]
parent = mytrees.get("parent")
virt_parent = mytrees.get("virt_parent")
+ current_parent = None
eapi = None
if parent is not None:
if virt_parent is not None:
- eapi = virt_parent[0].metadata['EAPI']
+ current_parent = virt_parent[0]
else:
- eapi = parent.metadata["EAPI"]
+ current_parent = parent
+
+ if current_parent is not None:
+ # Don't pass the eapi argument to use_reduce() for installed packages
+ # since previous validation will have already marked them as invalid
+ # when necessary and now we're more interested in evaluating
+ # dependencies so that things like --depclean work as well as possible
+ # in spite of partial invalidity.
+ if not current_parent.installed:
+ eapi = current_parent.metadata['EAPI']
try:
mysplit = use_reduce(depstring, uselist=myusesplit, masklist=mymasks, \