[oe] Yocto Project and OE - Where now?
fransmeulenbroeks at gmail.com
Mon Jan 17 20:01:29 CET 2011
Thanks for your post.
I think you describe the issues at hand quite clearly.
I would definitely be interested in working towards a new structure.
The one thing that I found partially missing in your post are the
actual design guidelines.
> * Creation of a subset of metadata that has a consistent high quality
> - removal of legacy components (pkgconfig hacks, libtool hacks,
> legacy staging, unneeded compiler arguments)
> - consistent metadata layout, spacing, use of variables
> - migration away from outdated practises (e.g. use BBCLASSEXTEND)
I fully agree with these but there are several other things in OE
metadata that we should discuss and probably try to avoid.
Without the aim of trying to be complete, I would like to name some,
also with the aim to kick off the discussion on these, order to come
to an accepted set of guidelines.
- where possible stick to one recipe per package. This reduces the
maintenance work and reduces the QA nightmare of lots of different
I feel one recipe per package should be the common case for
applications, and preferably also for libs (although I am well aware
that especially in the latter case multiple versions cannot always be
For kernel, u-boot and some toolchain parts , multiple recipes are unavoidable.
When moving to a new version or when a recipe needs some more testing,
I can imagine two versions existing for a while, but I feel this
should be an exception.
If a new version is not stable enough to be in the mainline, it should
probably live in its own overlay, not in the main repos
We should try to avoid the version diarrhea that some packages
currently have in OE (e.g. I recall that at some point we had about 10
abiword recipes, I can not really imagine anyone knowing the
differences between these, and I fail to see the point in having
these). There is no need to keep old versions around, as they are
still retrievable from git (assuming git is used as SCM).
- avoid DEFAULT_PREFERENCE. For packages with only one recipe it
shouldn't be needed at all. New, not integrated or only partially
tested recipes should reside in a separate overlay. Machine
maintainers should know best what kernel and u-boot version works best
for their machine. We do probably need to come up with a model on how
to deal with version upgrades though. This could be done with
different layers (e.g. bsp-sheevaplug and bsp-sheevaplug-next) or
maybe there are two different machines (e.g. sheevaplug and
sheevaplug-next). There are probably other solutions as well.
- avoid unneeded .inc files. In case there is only one recipe they
only complicate things as people need to examine two files. Of course
if there are multiple recipes for a package they have some merits
- avoid complex and/or unneeded python constructs in recipes. Ideally
a recipe is a description of metadata and it should be able to
describe it using variables only. In practice regularly functions like
do_compile() will be needed though, but it is probably less desirable
to write a complex piece of anonymous python to e.g. populate a -dev
package. W.r.t. readability, maintainability and understandability it
is probably better to just write it out. The goal of a recipe is not
to show off how well-versed one is in python, the goal should be to
come up with something that Joe or Jane Average also can understand.
- strong directory naming for patches. E.g. for foo, patches only for
1.2 should go in foo-1.2/, patches for foo 1.x should go to foo-1/ if
that is possible or otherwise in foo/. Patches should only go in
files/ if they are intended for multiple recipes where the recipes
have different names (e.g. if foo and foobar recipes exist in the same
dir and they need the same foopatch that one could live in files/
- no FILESPATHPKG to different version of a recipe. E.g. in the past
we had the glibc_2.x recipe pointing to the patch dir of 2.y (forgot
the actual values of x and y). If patches are for multiple recipes
they should go in a common higher level named dir (e.g. in the case
above glibc-2 or glibc or maybe the dir can be named differently and
FILESPATHPKG being used. Having patches live in other dirs where it is
not obvious is error prone when recipes are obsoleted.
These points were the things that at this moment popped up in my mind.
There are undoubtly more (e.g order of metadata, mandatory metadata).
It seems useful to agree on where we want to go to before actually
starting to walk (or run :-) ) in an undefined direction and waste
Feel free to add and discuss! Frans.
More information about the Openembedded-devel