waf: only set mandatory to False if not already set by the caller
authorRalph Boehme <slow@samba.org>
Fri, 29 Mar 2019 17:18:27 +0000 (18:18 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 29 Apr 2019 17:07:02 +0000 (17:07 +0000)
commitcbee3037a293273191c2c0c12a162589e01c884b
tree75bbced6fc120c066674394b864dc4684cf10b93
parent40f91924d6e5ab6d87a5c65256d2df235429d313
waf: only set mandatory to False if not already set by the caller

There are a bunch of callers that call find_program with mandatory=True,
we should not overwrite this when explicity passed, eg:

  ctx.find_program('objcopy', var='OBJCOPY', mandatory=True)

  conf.SAMBA_CHECK_PERL(mandatory=True)
    -> conf.find_program('perl', var='PERL', mandatory=mandatory)

With this patch we only change the default from False to True, but allow
callers to choose specific behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Apr 29 17:07:02 UTC 2019 on sn-devel-184
buildtools/wafsamba/samba_waf18.py