[oe] inc file discussion

Martin Jansa martin.jansa at gmail.com
Sat Oct 9 11:23:00 UTC 2010


On Sat, Oct 09, 2010 at 11:37:49AM +0200, Frans Meulenbroeks wrote:
> Dear all,
> 
> I see a lot of diversity in .inc files, and I was wondering whether we
> should not try to come up with some guidelines about their purpose,
> what should go in it, what not etc etc.
> 
> Some observations and questions:
> 
> Some of the inc files use INC_PR whereas others do not.
> 
> Some people seem to use .inc file as a way to save bytes in the
> archive and really put everything in it (including things like
> DESCRIPTION, LICENSE etc etc).
> While I agree that DESCRIPTION will probably not change between
> versions and LICENSE is also unlikely to change, it might be more user
> friendly to put them in the .bb file
> (so when you open the .bb file you immediate see the basic information
> of a package)
> It does not really make things more work when upgrading to a new
> version since I assume most people do like me and either do a git mv
> or a cp from an older version (which retains the info).

Well it's easier to improve DESCRIPTION when it's in .inc file. And when
you want description of some package you can open .inc file instead .bb
because you usually want DESCRIPTION of program as such, not for
particular version.

I'm one of those who saves bytes by putting everything shared by all
.bbs to .inc :).

> What I also noticed is .inc files saying things like:
> DEFAULT_PREFERENCE = "-1"
> Do we want this in an inc file? I'd say an inc file is shared between
> all versions; Personally I would prefer setting the -1 in the .bb
> file, not in the .inc

The list you've attached has lots of PN-PV.inc files where it's IMHO OK
to puth DEFAULT_PREFERENCE because usually you really want to set it for
all recipes of that version.

I agree that it's strange in .inc file used in ALL versions of some
package.

> And then there is DEPENDS in .inc files. I think there is some
> potential cause of getting unneeded DEPENDS
> Picture the following scenario: a new version needs an additional
> package, it gets added to the DEPENDS of the .inc file and suddenly
> older versions also get this DEPENDS (maybe unneeded).

This case is just wrong and fault of whoever added it to .inc DEPENDS.
If only new version needs it then you should put DEPENDS += only to
recipe needing it.

But I don't see why not keep "common" DEPENDS in .inc.

> I hope you get the idea.
> And of course I know that .inc files are useful (e.g when it comes to
> sharing python scripts etc). Then again, I feel sometimes we do too
> much in them.
> 
> How do others feel about this?

I feel it the other way, I like .bb where is only require for .inc 
and checksums.

Then it's clear that all versions are built the same only with newer
sources.

I agree that it's sometimes a bit confusing when different versions
override different parts of .inc and only reliable way to see effective
recipe is to run 'bitbake -e -b recipe.bb'

Regards,
-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com




More information about the Openembedded-devel mailing list