[yocto] inc files in recipes

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Fri Nov 19 01:24:14 PST 2010


2010/11/19 Gary Thomas <gary at mlbassoc.com>:

>
> The fact that there is only one recipe using a particular .inc is (I
> believe)
> a Poky/Yocto design practice.  Once a given recipe is known to work and
> cause
> no other dependencies or regressions, older versions are purged.  This is
> how
> Poky can build a very useful embedded system with only ~1000 recipes,
> whereas
> OE has terrible bloat (IMO) of nearly 8000!

I agree that the purging is good. The large number of recipes for the
same package makes things very hard to maintain.
Also most users will not understand why there are multiple versions,
what the difference is between them, or which one to pick.

>
> The practice of using a well-crafted .inc file should make it easier to keep
> up with the upstream changes.  Often, moving to a new version is as simple
> as
> creating a new recipe with the appropriate PN and you're done.  Very little
> duplication of effort, code or rules.

I don't think this depends on the inc file.

If you have a package x_0.bb with a well crafted x.inc file then
moving to 1 is just a cp (or mv or git mv) of x_0.bb to x_1.bb.
However if the package has no inc file but has all the stuff in the
.bb file moving to a new version is also just a cp of x_0.bb to
x_1.bb.
So effort wise this does not make a difference!

And yes you might see this as duplication but then again if x_0.bb is
going to be removed after x_1 is considered to be OK, this does not
hurt either.

Main advantage of .inc files is that (if well done) it reduces the
maintenance effort in case there are multiple versions.

Thinking of it: if yocto prefers .inc files it seems good to come up
with some guidelines what goes into a .inc file and what goes into the
.bb file.
In OE I've seen that people do stuff things like HOMEPAGE, DESCRIPTION
and LICENSE in the .inc file, in some cases even going to far that the
.bb file is only a oneliner including the .inc file

Frans



More information about the yocto mailing list