* [PATCH] build: Allow dirs/cleandirs to work for empty functions
@ 2016-09-14 21:29 Richard Purdie
2016-09-14 21:47 ` Christopher Larson
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2016-09-14 21:29 UTC (permalink / raw)
To: bitbake-devel
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>
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 9dfcfec..5759502 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/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')
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] build: Allow dirs/cleandirs to work for empty functions
2016-09-14 21:29 [PATCH] build: Allow dirs/cleandirs to work for empty functions Richard Purdie
@ 2016-09-14 21:47 ` Christopher Larson
0 siblings, 0 replies; 2+ messages in thread
From: Christopher Larson @ 2016-09-14 21:47 UTC (permalink / raw)
To: Richard Purdie; +Cc: bitbake-devel
[-- Attachment #1: Type: text/plain, Size: 591 bytes --]
On Wed, Sep 14, 2016 at 2:29 PM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> 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>
>
Looks good.
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
[-- Attachment #2: Type: text/html, Size: 1113 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-14 21:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14 21:29 [PATCH] build: Allow dirs/cleandirs to work for empty functions Richard Purdie
2016-09-14 21:47 ` Christopher Larson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.