summaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
authorThomas Nagy <tnagy@waf.io>2015-11-05 02:06:42 +0100
committerAndrew Bartlett <abartlet@samba.org>2015-11-06 10:37:24 +0100
commit963ccff806cf58898cdc8808138453d95df41b01 (patch)
treebebdc7816ef2d46c13d85b1a0dabf8c06c9213c1 /third_party
parent1f4f081b7aa7cbb8c9f92f0c5e39a870a5c1c6a3 (diff)
downloadsamba-963ccff806cf58898cdc8808138453d95df41b01.tar.gz
build:wafsamba: Remove samba_utils.runonce
The decorator order matters in the following: """ @runonce @conf function() """ First, the @conf decorator binds the function to the configuration context and then returns the same function. The @runonce decorator then takes the output function and replaces it by another that performs caching. This new function remains in the current script and is never bound to the configuration context, so caching never occurs. The declaration would have been correct if written like this: """ @conf @runonce function() """ Yet the decorator @run_once does not keep the function name (__name__), so the annotation with @conf would fail. The straightforward approach is to remove all the incorrect @runonce occurrences. Besides that, the function Utils.run_once is already present in the Waf library, and is sufficient for the current needs of the Samba code (it caches only the first argument). Therefore samba_utils.runonce can be safely replaced by Utils.run_once, which is also present in Waf 1.8. Note: at runtime, only SETUP_BUILD_GROUPS seems to actually use caching. Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Uri Simchoni uri@samba.org Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'third_party')
0 files changed, 0 insertions, 0 deletions