Bug 1257326 - Respect origins set by any caller of CommandLineHelper.add.
Origins will be set for any caller of CommandLineHelper.add, but will only
be propagated if args are added to extra_args. This results in an incorrect
origin recorded for mozconfig injected arguments.
MozReview-Commit-ID: 9mJCaNHyd5C
--- a/python/mozbuild/mozbuild/configure/options.py
+++ b/python/mozbuild/mozbuild/configure/options.py
@@ -404,18 +404,17 @@ class CommandLineHelper(object):
elif from_name or from_env:
arg, pos = from_name if from_name else from_env
elif option.env and args is self._args:
env = self._environ.get(option.env)
if env is not None:
arg = '%s=%s' % (option.env, env)
origin = 'environment'
- if args is self._extra_args:
- origin = self._origins.get(arg, origin)
+ origin = self._origins.get(arg, origin)
for k in (option.name, option.env):
try:
del args[k]
except KeyError:
pass
return arg, origin