Hi,
While upgrading from 4.5 to 4.7 I found a problem with ordering of layers similar
to the ones described here [1] and here [2]
[1] https://github.com/siemens/kas/issues/36
[2] https://github.com/siemens/kas/issues/130
Namely, the ordering of repos/layers changed (already in 4.6)
and, thus, the resulting `BBLAYERS` in the `build/conf/bblayers.conf` changed.
In one of my layers we are using config files overriding/masking the ones from
upstream layers. While that's not an issue with recipes (`BBFILE_PRIORITY_*`)
bitbake only respects those prios for recipes. While still maintaining search order
for configs and other files based on `BBLAYERS`.
Since the ordering changed this, directly affected one of my machine configs.
I know the fundamental issue I had was not appearing up to now just by
“coincidence”, but it triggered me doing some investigation.
Up to 4.5 kas ordered by path appended to `BBLAYERS`.
There was an attempt to mitigate the issues (linked above) done by Felix:
https://github.com/siemens/kas/commit/ecf5827b0769e3fcacb8b7ff7a73659ee6dc39ab
This orders the repositories and layers based on their name (=id if not specified)
Thus, one can force order by adding `name` to the repositories.
Unfortunately, this has two major drawbacks:
1. Changing the name of the repositories, also impacts the folder in which they
are cloned, which seems not ideal to me.
2. There is no way to specify order for layers.
e.g. for isar many projects use meta and meta-isar ending up in
```
${TOPDIR}/../work/isar/meta \
${TOPDIR}/../work/isar/meta-isar"
```
thus config from meta precedes config from meta-isar,
which imo is not what users expect!
Some quick thoughts how to make the ordering forcible without having to care about
the path we are cloning repos to:
1. preserve the order as it was in the kas file(s)
I had a quck discussion with Felix offline, he mentioned that this is not an option.
Since I could not understand why, I put it here for clarification.
2. Use the repo dictionaries id to force order. This allows for specifying the
clone directory by setting name while allowing to add ordering by changing the
repository id. While implementation effort is very low, this does not help with
layers. -> not an option
3. Adding priority/ordering to repo and layer dictionary.
This would solve the problem for repo and layer, but requires to maintain the
ordering manually, especially when pulling in kas files from other repos.
4. Adding priority/ordering derived from the layers `BBFILE_PRIORITY_*`
That way, config precedence would match the precedence order of recipes.
What are your thoughts?
BR Alexander