[yocto] Use of BBFILE_PATTERN in conf/layer.conf
Andrew Luo
andrew_4122 at yahoo.com
Thu Jan 30 21:22:40 PST 2014
I see this example in the doc:
# We have a conf and classes directory, add to BBPATH
BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a recipes directory containing both .bb and .bbappend files, add to BBFILES
BBFILES := "${BBFILES} ${LAYERDIR}/recipes/*/*.bb \
${LAYERDIR}/recipes/*/*.bbappend"
BBFILE_COLLECTIONS += "emenlow"
BBFILE_PATTERN_emenlow := "^${LAYERDIR}/"
BBFILE_PRIORITY_emenlow = "6"
The doc says this about the BBFILE_PATTERN variable:
Variable that expands to match files from BBFILES in a particular layer. BBFILE_PATTERN is used in the conf/layer.conf file and must contain the name of the specific layer (e.g. BBFILE_PATTERN_emenlow).
so it sounds like the BBFILE_PATTERN is a regular expression to filter just the bb files belonging to this layer from all the BBFILES. But when I set this variable to include also the recipes dir like so:
BBFILE_PATTERN_emenlow := "^${LAYERDIR}/recipes/", the layer name does not show up in bitbake-layers show-recipes command. I mean this is just a more specific pattern for my recipe files in the particular layer right? Found that in the get_file_layer_dir function:
def get_file_layerdir(self, filename):
for layer, _, regex, _ in self.bbhandler.cooker.recipecache.bbfile_config_priorities:
if regex.match(filename):
for layerdir in self.bblayers:
if regex.match(os.path.join(layerdir, 'test')) and re.match(layerdir, filename):
return layerdir
return "?"
so looks like anything more specific than the ${LAYERDIR} will not match <layerdir>/test test string, so it won't work. Is this intentional?
Thanks,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20140130/f6ce727f/attachment.html>
More information about the yocto
mailing list