[oe] [RFC] A case of distro config overriding DISTRO var

Richard Purdie rpurdie at rpsys.net
Tue Jan 29 01:00:52 UTC 2008


On Tue, 2008-01-29 at 02:31 +0200, Paul Sokolovsky wrote:
> On Mon, 28 Jan 2008 23:22:50 +0000
> Richard Purdie <rpurdie at rpsys.net> wrote:
> > You need to put the := directly before the code that changes DISTRO.
> > Yes, you could add this in bitbake.conf after local.conf and before
> > including ${DISTRO}.conf but that seems ugly to me.
> 
> Ugly (or better, unclean) is to reuse top-level input parameter from
> user for different purpose. So, at first, the meaning of DISTRO is
> "name of the distro config", and then suddenly it changes to "value to
> use for overrides, etc". The second use should have different name then,
> as again, DISTRO is user's primary input param for OE. That would be
> clean solution...

Distro maintainers have chosen to do this. They could use an
ANGSTROM_DISTRO_VERSION variable to do this instead...
 
> > I'd prefer USERDISTRO = "${DISTRO}" in bitbake.conf and then having
> > angstrom overriding that using := if it really has to...
> 
> ... But as we don't want to revamp OE up to that level ;-), then we
> should find good place to work that around. The issue here is that
> overriding DISTRO is common practice, we even have pe(a)rls like:
> 
> DISTRO = "Jornada Linux Mobility Edition"

Whoever merged that should be shot...

> So, it should be worked around on OE's level (== bitbake.conf), not on
> distro's level.

Distro maintainers dug themselves into this hole...

But yes, I think something at OE level can help. That was my proposal...

> Also, what's exactly ugly? ":="? 

It breaks the way standard variables work and catches people out. It has
a long history of confusing users, developers and even the core devs. I
ended up purging hundreds of the things from the metadata a while back
since all but about 10 were totally unneeded and just confused and broke
things. I have no desire to return to that.

It also stops people from overriding something from their local.conf.

> Then we for sure should make exception
> for bitbake.conf, simply because := is unavoidable for meta-stuff, and
> bitbake.conf already has bunch of them. 

Ok, looking through the conf directory, bitbake.conf has exactly 3 of
them. DATE and TIME are obvious special cases and CACHE is commented to
explain why its special.

Angstrom has one, there are several to trigger fatal errors and the
nylon distro is doing something that looks dubious at best.

In classes there are six references, I know three are valid offhand, the
others look dubious.

So we only have say 10 cases in the core, not very many at all and they
are avoidable.

> IMHO, it's uglier to have
> something defined as "=" in bitbake.conf, and require distro to
> override that with ":=".

The distro is the entity that is overriding DISTRO and making it do two
things. Having it jump through an extra hoop because of that isn't a
problem.

Cheers,

Richard






More information about the Openembedded-devel mailing list