diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-14 22:29:43 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-14 23:04:04 +0100 |
commit | 5bf874673d75b5f4ff2b34f0ab8502558ee84d00 (patch) | |
tree | 821ba30716b7971f81d8e60249a9c97b18aa7d24 /lib/bb/build.py | |
parent | 8e6a893cb7f13ea14051fc40c6c9baf41aa47fee (diff) | |
download | bitbake-5bf874673d75b5f4ff2b34f0ab8502558ee84d00.tar.gz |
build: Allow dirs/cleandirs to work for empty functions
Users are surprised when dirs/cleandirs aren't acted upon for
empty functions. This reorders the code slightly so that those
flags are acted upon for empty functions as there are cases where
this is expected.
[YOCTO #10256]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/build.py')
-rw-r--r-- | lib/bb/build.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py index 310b5c051..fcf014917 100644 --- a/lib/bb/build.py +++ b/lib/bb/build.py @@ -193,12 +193,6 @@ def exec_func(func, d, dirs = None, pythonexception=False): except: oldcwd = None - body = d.getVar(func, False) - if not body: - if body is None: - logger.warning("Function %s doesn't exist", func) - return - flags = d.getVarFlags(func) cleandirs = flags.get('cleandirs') if cleandirs: @@ -217,6 +211,13 @@ def exec_func(func, d, dirs = None, pythonexception=False): adir = dirs[-1] else: adir = None + + body = d.getVar(func, False) + if not body: + if body is None: + logger.warning("Function %s doesn't exist", func) + return + ispython = flags.get('python') lockflag = flags.get('lockfiles') |