From: Zac Medico Date: Thu, 26 Aug 2010 23:49:20 +0000 (-0700) Subject: Bug #334365 - Make dep_check() less strict with respect to EAPI X-Git-Tag: v2.2_rc70~42 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=ada7f4f6f009d2eab5d98e5e6f284a80738bb55b;p=portage.git 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. --- 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, \