From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: [PATCH] build: Allow dirs/cleandirs to work for empty functions
Date: Wed, 14 Sep 2016 22:29:43 +0100 [thread overview]
Message-ID: <1473888583.7207.63.camel@linuxfoundation.org> (raw)
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')
next reply other threads:[~2016-09-14 21:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-14 21:29 Richard Purdie [this message]
2016-09-14 21:47 ` [PATCH] build: Allow dirs/cleandirs to work for empty functions Christopher Larson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473888583.7207.63.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.