| Summary: | layer priorities shadowing | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Stefan Mueller-Klieser <s.mueller-klieser> |
| Component: | bitbake | Assignee: | Nitin Kamble <nitin.a.kamble> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | Medium | CC: | dvhart, nitin.a.kamble, poky.bs.watcher, poky.watcher, richard.purdie, tom.zanussi |
| Version: | unspecified | ||
| Target Milestone: | 1.7 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Stefan Mueller-Klieser
2014-07-18 09:10:09 UTC
Its probably working as designed but the configuration is unclear.
The top level layer.conf does:
BBFILE_PATTERN_intel := "^${LAYERDIR}/"
BBFILE_PRIORITY_intel = "5"
then crownbay for example does:
BBFILE_PATTERN_crownbay := "^${LAYERDIR}/"
BBFILE_PRIORITY_crownbay = "6"
so when bitbake has some recipe file, it tries to resolve which layer the file belongs to and it therefore calls each BBFILE_PATTERN in turn until one matches. Since the crownbay directory is within intel, it only works if crownbay is called first, then intel as a later match.
In turn, that only happens if the order in bblayers.conf is the correct way around.
So the fix is either to improve the BBFILE_PATTERN_intel := "^${LAYERDIR}/" to say BBFILE_PATTERN_intel := "^${LAYERDIR}/common" and/or to be specific about the bblayers.conf ordering (which does matter).
I'm ccing a few meta-intel people to see if this is something they can fix.
The <<BBFILE_PATTERN_intel := "^${LAYERDIR}/common">> solution look favorable to me, as it can remove the requirement of ordering of listing layers in the bblayers.conf file. I feel the ordering should not be needed, as layer priority is handling same requirement. But I need to verify it can really solve the issue. I will do it and respond it here.
The <<BBFILE_PATTERN_intel := "^${LAYERDIR}/common">> solution is working as expected. The oder of layers in the bblayers.conf does not affect order in which the layers are considered. The layer priority mechanism is working as expected. I could build couple of BSPs with this change toe BBFILE_PATTERN variable.
Looks like the change can go in without any other side effects.
RP,
Are there any other aspects to this change I need to be aware of before pushing the change in the meta-intel layer?
Nitin: No, I think that fix can be merged. patch on the meta-intel ML commit 6702f5a00c414c68f6f6ceae46552bce571cf93f Author: Nitin A Kamble <nitin.a.kamble@intel.com> Date: Fri Sep 26 17:04:57 2014 -0700 layer.conf: Avoid conflicts with sub-layers The layer priority is getting ignored because the same set of files are visible in the meta-intel layer as well as any of its sub layers. The layer pattern for recipe files is changed from "^${LAYERDIR}/" to "^${LAYERDIR}/common" to stop unintentionally including the sub-layer recipe files in the meta-intel layer. Fixes Bug: [YOCTO #6552] Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> |