diff options
author | Paul Sokolovsky <pmiscml@gmail.com> | 2008-02-12 17:56:42 +0000 |
---|---|---|
committer | Paul Sokolovsky <pmiscml@gmail.com> | 2008-02-12 17:56:42 +0000 |
commit | b9e4b25300b451df273a4d64aef4530b8ec18fbc (patch) | |
tree | 84400839bd02ce74d210740d796509a535007fae | |
parent | 7083b385f61a37eabba234ec5704e4e3e3c8cd26 (diff) |
bitbake.conf, image.bbclass: Add and use USERDISTRO var to preserve original DISTRO value.
* 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.
-rw-r--r-- | classes/image.bbclass | 1 | ||||
-rw-r--r-- | conf/bitbake.conf | 4 | ||||
-rw-r--r-- | conf/distro/include/angstrom.inc | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/classes/image.bbclass b/classes/image.bbclass index ca9c9458e1..d70cfa5daf 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -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 diff --git a/conf/bitbake.conf b/conf/bitbake.conf index c6ef6012bf..27a04a028c 100644 --- a/conf/bitbake.conf +++ b/conf/bitbake.conf @@ -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 diff --git a/conf/distro/include/angstrom.inc b/conf/distro/include/angstrom.inc index fe216800c3..6ba20c4830 100644 --- a/conf/distro/include/angstrom.inc +++ b/conf/distro/include/angstrom.inc @@ -2,6 +2,8 @@ #@NAME: Angstrom #@DESCRIPTION: Release independent distribution configuration for Angstrom +# Preserve original DISTRO value +USERDISTRO := "${DISTRO}" DISTRO = "angstrom" DISTRO_NAME = "Angstrom" |