can use requires with self option

This commit is contained in:
2018-04-25 19:12:54 +02:00
parent 2018a92b66
commit b442d52289
6 changed files with 44 additions and 9 deletions

View File

@ -481,7 +481,7 @@ class Settings(object):
for option, expected in exps:
reqpath = option.impl_getpath(context)
#FIXME c'est un peut tard !
if reqpath == path or reqpath.startswith(path + '.'):
if reqpath.startswith(path + '.'):
raise RequirementError(_("malformed requirements "
"imbrication detected for option:"
" '{0}' with requirement on: "
@ -493,8 +493,13 @@ class Settings(object):
elif option.impl_is_multi():
is_indexed = True
sconfig_bag = config_bag.copy('nooption')
if config_bag.option == option:
sconfig_bag.setting_properties = None
sconfig_bag.force_unrestraint= False
sconfig_bag.validate = False
else:
sconfig_bag.force_permissive = True
sconfig_bag.option = option
sconfig_bag.force_permissive = True
try:
value = context.getattr(reqpath,
idx,