[oe] DISTRO override logic in angstrom.inc

Paul Sokolovsky pmiscml at gmail.com
Mon Feb 18 20:27:16 UTC 2008


Hello,

On Mon, 18 Feb 2008 20:52:30 +0100
Michael 'Mickey' Lauer <mickey at vanille-media.de> wrote:

> Not having paid close attention to the "A case for user distro"
> thread, I was quite surprised when today the OpenMoko distro override
> no longer worked.
> 
> OpenMoko bases on angstrom and subsequently includes angstrom.inc
> which forcefully sets DISTRO = angstrom. I wonder whether this is a
> bit too violent against sharing files.
> 
> I had to 
> 
> -OVERRIDES = "local:${MACHINE}:${DISTRO}:angstrom:${TARGET_OS}:
> ${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
> +OVERRIDES = "local:${MACHINE}:openmoko:angstrom:${TARGET_OS}:
> ${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
> 
> to get the wanted behaviour back.

Hm, but that only shows that overriding DISTRO is indeed weird thing
which can lead to complex include file interactions. So, how it was
before is:

1. openmoko.conf includes angstrom-2007-for-openmoko.inc which
indirectly includes angstrom.inc which overrides DISTRO.
2. Then, openmoko.conf had DISTRO="openmoko" which looked like null
assignment, but actually re-set DISTRO after angstrom.inc's deeds.

Well, I went over all distro confs and removed everything which looked
like empty assignments, who could imagine there's such imperative logic
based on include order happens with OpenMoko? I'm sorry for the hassle
this caused, but in the end Angstrom seems to be the offender as the
only distro which plays tricks with DISTRO.

I believe the OVERRIDES update above is the correct and reliable
solution to this issue, and would like to propose that we finished with
this DISTRO override cleanup:

1. Treat DISTRO as the input-only parameter from user, and thus ban
assignments to it.
2. Make Angstrom to use OVERRIDES like above.

I don't know if Angstrom relies somewhere else on DISTRO to be
overriden, but that can, and should be fixed too (usage in OVERRIDES
apparently should be the most heavy assumption).

I also think that using literal values like "openmoko" and "angstrom"
is the right way, though for completeness, here's version with extra
indirection. In bitbake.conf:

DISTRO_OVERRIDE = ${DISTRO}
OVERRIDES =
"local:${MACHINE}:${DISTRO_OVERRIDES}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"

Then distros which need that can use DISTRO_OVERRIDE :=

Again, IMHO that just complicates the matter.

> 
> :M:
> 
> -- 
> Dr. Michael 'Mickey' Lauer | IT-Freelancer |
> http://www.vanille-media.de
[]

-- 
Best regards,
 Paul                          mailto:pmiscml at gmail.com




More information about the Openembedded-devel mailing list