Bug 1257326 - Respect origins set by any caller of CommandLineHelper.add. draft
authorChris Manchester <cmanchester@mozilla.com>
Mon, 09 May 2016 15:20:15 -0700
changeset 365024 021a389f44dfd317a8fe8be38ecc09b6eff57db4
parent 364815 043082cb7bd8490c60815f67fbd1f33323ad7663
child 365025 885ec71eab3e8a243fc47fe28af04e70282195c2
push id17617
push usercmanchester@mozilla.com
push dateMon, 09 May 2016 22:22:03 +0000
bugs1257326
milestone49.0a1
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
python/mozbuild/mozbuild/configure/options.py
--- 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