transitive in apply_requires should only by apply if properties are same has testing action

This commit is contained in:
2016-10-12 22:17:04 +02:00
parent c31590c2ac
commit 2e4fdbca03
3 changed files with 35 additions and 1 deletions

View File

@ -633,6 +633,7 @@ class Settings(object):
else:
calc_properties = set()
context = self._getcontext()
all_properties = None
for requires in opt.impl_getrequires():
for require in requires:
option, expected, action, inverse, \
@ -653,7 +654,13 @@ class Settings(object):
if isinstance(value, Exception):
if isinstance(value, PropertiesOptionError):
if not transitive:
continue
if all_properties is None:
all_properties = []
for requires in opt.impl_getrequires():
for require in requires:
all_properties.append(require[2])
if not set(value.proptype) - set(all_properties):
continue
properties = value.proptype
if same_action and action not in properties: # pragma: optional cover
raise RequirementError(_("option '{0}' has "