[oe] A new bitbake extension: .bbappend files

Douglas Royds douglas.royds at taitradio.com
Mon Jul 19 00:02:05 UTC 2010


On 17/07/10 02:25, Richard Purdie wrote:
> Whilst our layers mechanism, is great it does have a drawback which has
> bugged me for a while. If you have a recipe like pointercal which has
> machine specific information in it and you have your new machine code in
> a layer, how do you add a pointercal file for your machine?
>
> Answer is you copy the whole pointercal recipe and files into your
> layer, then add the single file for your machine.
>    

For our overlay distro, I solved this problem as follows (in 
"conf/distro/tait.conf"):

# Compute a FILESPATHBASE that will cause the FILESPATH search string 
(for file:// URIs) to
# list tait.openembedded directories first, and org.openembedded 
directories second.
# This allows us to put a single file, eg. lighttpd.conf, into our 
tait.openembedded distribution,
# and it will be picked up by OE in preference to the deault lighttpd.conf.
# The directory containing the recipe is not necessarily the same as the 
package name.
# For instance, for lighttpd_1.2.3.bb, we want
# FILE_DIRBASENAME = lighttpd
# FILESPATHBASE = 
"/home/roydsd/Work/DBS/tait.openembedded/branches/2.6.32/recipes/lighttpd:
# 
/home/roydsd/Work/DBS/org.openembedded.dev/branches/2010-02-23/recipes/lighttpd"
# BBFILES is a space-separated list of /path/to/recipes/*/*.bb patterns.
# Split each pattern at the recipes keyword to get 
/home/roydsd/Work/DBS/tait.oe/trunk/,
# then tack on recipes/lighttpd, and
# join the whole lot together with colons
FILE_DIRBASENAME = 
"${@os.path.basename(os.path.dirname(bb.data.getVar('FILE', d)))}"
FILESPATHBASE = ${@':'.join([ pattern.split('recipes')[0] + 
'recipes/${FILE_DIRBASENAME}' for pattern in '${BBFILES}'.split() ])}

For example:

tait.openembedded/trunk/recipes/ntp/
└── files/
└── ntp.conf

BBFILES="/home/roydsd/Work/DBS/tait.openembedded/trunk/recipes/*/*.bb 
/home/roydsd/Work/DBS/org.openembedded.dev/branches/2010-02-23/recipes/*/*.bb"
FILESPATHBASE="/home/roydsd/Work/DBS/tait.openembedded/trunk/recipes/ntp:/home/roydsd/Work/DBS/org.openembedded.dev/branches/2010-02-23/recipes/ntp"

Does this achieve what you had in mind?
Douglas.
=======================================================================
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================





More information about the Openembedded-devel mailing list