From: Andreas Mueller <schnitzeltony@gmx.de>
To: "Patches and discussions about the oe-core layer"
<openembedded-core@lists.openembedded.org>
Subject: Re: How to reuse code in oe-core environment
Date: Thu, 30 Jun 2011 02:39:28 +0200 [thread overview]
Message-ID: <201106300239.28629.schnitzeltony@gmx.de> (raw)
In-Reply-To: <BANLkTimEROj5AcR+eYjLVFH2Sh3+0sB04A@mail.gmail.com>
On Thursday, June 30, 2011 01:59:33 AM Chris Larson wrote:
> On Wed, Jun 29, 2011 at 4:02 PM, Andreas Mueller <schnitzeltony@gmx.de> wrote:
> > foo() {
> > # code to reuse
> > }
> >
> > and called foo from several recipes. In oe-core the run.* scripts are
> > much more stripped of unnecessary. All the code included by 'require'
> > seems to miss, so the function foo() will not be found.
> >
> > My searches for examples did not lead to a hook so what is the suggested
> > solution for reusing code for multiple recipes in oe-core?
>
> The require doesn't have to do with anything. bitbake emits only the
> functions which get called somewhere from the task being run. It
> tracks what variables reference what other variables. If you call a
> shell function from another shell function, it tracks this, and
> realizes that both need to be emitted. Either you're doing something
> wrong, or you're doing something in a way that bitbake can't track.
> There's a variable flag you can set to explicitly add variable
> dependencies.
the scenario I wrote was not the whole truth - sorry:
I am making a new layer. There I have created u-boot_git.bbappend. In the build
log I see that this extends u-boot_git.bb coming from meta-texasinstruments. In
u-boot_git.bbappend there is (besides other showing me that bbappending works)
| require foo.inc
and
| do_deploy_append_<mynewmachine> {
| foo
| }
the code in foo.inc is something like
| foo() {
| sed ..
| install ...
| }
Build stops complaining that foo cannot be found and the only function I see in
run.do_deploy.nnnnn is do_deploy().
All code was taken from oe and builds fine there. Only difference to oe is that
the lines now found in u-boot_git.bbappend were part of the one and only u-
boot_git.bb recipe.
Is it possible that that the dependency checks ignore functions brought in by
bbappend - or where am I going wrong?
regards
Andreas
prev parent reply other threads:[~2011-06-30 0:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-29 23:02 How to reuse code in oe-core environment Andreas Mueller
2011-06-29 23:57 ` Khem Raj
2011-06-29 23:59 ` Chris Larson
2011-06-30 0:32 ` Mark Hatle
2011-06-30 0:42 ` Andreas Mueller
2011-06-30 0:39 ` Andreas Mueller [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=201106300239.28629.schnitzeltony@gmx.de \
--to=schnitzeltony@gmx.de \
--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