From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] bitbake.conf: Added new variable BBINCLUDES
Date: Fri, 24 Feb 2012 16:29:14 +0000 [thread overview]
Message-ID: <1330100954.5477.9.camel@ted> (raw)
In-Reply-To: <f52803bfc127eb77b31587e998f91f296254a205.1330051744.git.lianhao.lu@intel.com>
On Fri, 2012-02-24 at 11:00 +0800, Lianhao Lu wrote:
> The new variable BBINCLUDES contains the file dependency information. It
> exposes the bitbake internal variable '__depends' and '__base_depends'.
>
> Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
> ---
> meta/conf/bitbake.conf | 2 ++
> meta/lib/oe/utils.py | 9 +++++++++
> 2 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 90e5f7a..04851e5 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -731,3 +731,5 @@ BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_
>
> MLPREFIX ??= ""
> MULTILIB_VARIANTS ??= ""
> +
> +BBINCLUDES = "${@oe.utils.get_file_depends(d)}"
> diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
> index 02d5442..b4dcc4f 100644
> --- a/meta/lib/oe/utils.py
> +++ b/meta/lib/oe/utils.py
> @@ -88,3 +88,12 @@ def param_bool(cfg, field, dflt = None):
> def inherits(d, *classes):
> """Return True if the metadata inherits any of the specified classes"""
> return any(bb.data.inherits_class(cls, d) for cls in classes)
> +
> +def get_file_depends(d):
> + '''Return the dependent files'''
> + dep_files = []
> + depends = d.getVar('__depends', True) or set()
> + depends = depends.union(d.getVar('__base_depends', True) or set())
> + for (fn, ctime) in depends:
> + dep_files.append(os.path.abspath(fn))
> + return " ".join(dep_files)
My big concern with this is that we're teaching lib/oe about bitbake
internals like the layout and existence of those two variables. I think
we need to do this within bitbake, maybe in ast.py:finalize() just
before we fire the RecipeParsed() event.
Having thought more about it, I think we should call this variable
BBINCLUDED since that more accurately reflects its contents.
Cheers,
Richard
prev parent reply other threads:[~2012-02-24 16:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-24 3:00 [PATCH 0/1] Added new variable BBINCLUDES Lianhao Lu
2012-02-24 3:00 ` [PATCH 1/1] bitbake.conf: " Lianhao Lu
2012-02-24 16:29 ` Richard Purdie [this message]
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=1330100954.5477.9.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox