]> git.openpandora.org Git - openembedded.git/commitdiff
bitbake.conf, image.bbclass: Add and use USERDISTRO var to preserve original DISTRO...
authorPaul Sokolovsky <pmiscml@gmail.com>
Tue, 12 Feb 2008 17:56:42 +0000 (17:56 +0000)
committerPaul Sokolovsky <pmiscml@gmail.com>
Tue, 12 Feb 2008 17:56:42 +0000 (17:56 +0000)
* Some distros override DISTRO var to hack overrides right, etc. Yet, original
value may be needed sometimes. For example, bbimage expects DISTRO to be what
user set/passed it, not something else.
* TODO: After interim cleanup during preparation of this patch, it turns out
that angstrom is the only distro to (ab)use DISTRO overriding. It may make sense
to instead get its OVERRIDES value right.

classes/image.bbclass
conf/bitbake.conf
conf/distro/include/angstrom.inc

index ca9c9458e1e8c322d7515063e94938b3272a4042..d70cfa5daf04174e1fda5d5945aee0de67be3d9c 100644 (file)
@@ -90,6 +90,7 @@ fakeroot do_rootfs () {
        ${IMAGE_PREPROCESS_COMMAND}
                
        export TOPDIR=${TOPDIR}
+       export DISTRO=${USERDISTRO}
        export MACHINE=${MACHINE}
 
        for type in ${IMAGE_FSTYPES}; do
index c6ef6012bf58cb80359bc020b3ddc92a24147127..27a04a028c916d63d2efcb1d6e73b710016a046b 100644 (file)
@@ -529,6 +529,10 @@ OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUIL
 include conf/site.conf
 include conf/auto.conf
 include conf/local.conf
+# USERDISTRO should always contain original DISTRO value as set by user
+# If a distro config overrides DISTRO for whatever reason (e.g. to get
+# overrides like it wants), USERDISTRO must be reassigned with := first
+USERDISTRO = "${DISTRO}"
 include conf/build/${BUILD_SYS}.conf
 include conf/target/${TARGET_SYS}.conf
 include conf/machine/${MACHINE}.conf
index fe216800c36cfc144c417f1e16b245c4b98004c9..6ba20c4830077f67fec0a10dbc768e2ae1d515f6 100644 (file)
@@ -2,6 +2,8 @@
 #@NAME: Angstrom 
 #@DESCRIPTION: Release independent distribution configuration for Angstrom
 
+# Preserve original DISTRO value
+USERDISTRO := "${DISTRO}"
 DISTRO = "angstrom"
 DISTRO_NAME = "Angstrom"