[oe-commits] [bitbake] 05/05: build: Allow dirs/cleandirs to work for empty functions
git at git.openembedded.org
git at git.openembedded.org
Wed Sep 14 21:43:22 UTC 2016
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit a021910bd5c95704842cbed86bb1bb7c835c610c
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Sep 14 22:29:43 2016 +0100
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 at linuxfoundation.org>
---
lib/bb/build.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 310b5c0..fcf0149 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')
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list