From: Denys Dmytriyenko <denis@denix.org>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: require/include a .bb file in the same directory?
Date: Fri, 30 Mar 2012 15:50:30 -0400 [thread overview]
Message-ID: <20120330195030.GA24301@denix.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1203300551220.28382@oneiric>
On Fri, Mar 30, 2012 at 05:59:22AM -0400, Robert P. J. Day wrote:
>
> couple questions about the require/include directives. first, can
> you include *any* valid text file? not just your standard .inc file
> (even though that is of course the most common thing to do).
>
> and second, i'm looking at this example in meta/recipes-core/images,
> where the recipe file core-image-minimal-mtdutils.bb is defined as:
>
> require core-image-minimal.bb
> IMAGE_INSTALL += "mtd-utils"
>
> that looks perfectly reasonable since that required .bb file is in the
> same directory, and this is clearly just defining a new image recipe
> by adding one more package.
>
> but the explanation of include/require in the bitbake manual is:
>
> "if the path specified on the include line is a relative path,
> BitBake will locate the first one it can find within BBPATH."
>
> that suggests that, by some massively unlikely fluke, i might
> unknowingly have an identically-named recipe file earlier in my BBPATH
> variable and that earlier one is the one that would be included. is
> that correct?
For that to happen, the file has to be in the top-level directory of one of
your layers listed by BBPATH, which rarely happens, as proper layers have at
least a minimal directory structure, such as conf/, recipes/ etc.
On the other hand, if you really want that file to be included from another
layer, which is higher priority or listed earlier, then you would need to do:
require recipes-core/images/core-image-minimal.bb
> and if that's true, could i avoid that kind of mistake by doing:
>
> require ./core-image-minimal.bb
I haven't tried that, but I believe it will be the same as w/o ./
> i realize getting hung up like this is unlikely, but it's always
> possible.
--
Denys
next prev parent reply other threads:[~2012-03-30 19:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 9:59 require/include a .bb file in the same directory? Robert P. J. Day
2012-03-30 19:50 ` Denys Dmytriyenko [this message]
2012-03-30 19:54 ` Chris Larson
2012-03-30 20:20 ` Robert P. J. Day
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=20120330195030.GA24301@denix.org \
--to=denis@denix.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