- The find layers commands will default to looking at:
*
,*/*
,${COREBASE}/../*,
${COREBASE}/../*/*
- Rework command handling to pull commands from plugins, the way recipetool and devtool do, ideally sharing code for it
- Add sort-layers command, to sort BBLAYERS by
BBFILE_PRIORITY
- Add find-layer-by-name command
- Add find-layer-with-path command
- Add find-layer-depends command
- Determine whether to merge any of the find-layer commands. I.e. by-name could handle depends, but then what about getting depends for layer paths rather than names? Initially keep them separate and benchmark and test usage.
- Consider adding a command which wraps those components
- Let add-layer accept mutiple layers, or create add-layers (or the former, then alias to the latter)
- Let remove-layer accept multiple layers, not just a wildcard
- Consider adding LAYERDEPENDS sanity checking to add-layer and remove-layer
- In find-layer-by-name and find-layer-depends, don't bother looking for layers we already have enabled. This will also mean that having a layer explicitly listed in BBLAYERS will avoid issues with duplicate layers existing. I.e. if you have poky and oe-core both cloned, that's not a problem if one of them is already in BBLAYERS, as that one will win.
- Sort out singular vs plural in the command naming
Example of usage:
find_layers () {
for layer; do
if [ -d "$layer" ]; then
echo "$layer"
fi
done
for layer; do
if [ ! -d "$layer" ]; then
echo "$layer"
fi
done | nlxargs bitbake-layers find-layer-by-name
}
add_with_deps () {
tr '\n' '\0' | xargs -0 bitbake-layers find-layer-depends -k || return 2 | \
sort -u | tr '\n' '\0' | xargs -0 bitbake-layers add-layer && \
bitbake-layers sort-layers || return 3
}
{
bitbake-layers find-layer-by-name mentor-staging
bitbake-layers find-layer-with-path conf/distro/mel.conf conf/machine/intel-corei7-64.conf
} | add_with_deps