Bug 1259352 - Always fail check_prog if an explicit value was given on the command line or environment. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 24 Mar 2016 15:34:09 +0900
changeset 314072 86f7d5108e831169c5690f46fd9d0fe8dd9411be
parent 314071 335fcad998a98b454f81e5798780915b666625f5
child 314073 f7b4671d3a987153f4e0d9ecf4886b25774dce05
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1259352
milestone48.0a1
Bug 1259352 - Always fail check_prog if an explicit value was given on the command line or environment. r=ted
build/moz.configure/checks.configure
--- a/build/moz.configure/checks.configure
+++ b/build/moz.configure/checks.configure
@@ -62,20 +62,20 @@ def check_prog(var, progs, allow_missing
         if value:
             progs[:] = value
         for prog in progs:
             result = find_program(prog)
             if result:
                 return result
         return not_found
 
-    @depends(check)
+    @depends(check, var)
     @advanced
-    def postcheck(value):
-        if value is not_found and not allow_missing:
+    def postcheck(value, raw_value):
+        if value is not_found and (not allow_missing or raw_value):
             from mozbuild.shellutil import quote
             error('Cannot find %s (tried: %s)'
                   % (var.lower(), ', '.join(quote(p) for p in progs)))
         return None if value is not_found else value
 
     @depends(postcheck)
     def normalized_for_config(value):
         return ':' if value is None else value