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

Paul Sokolovsky pmiscml at gmail.com
Sat Feb 9 09:56:07 UTC 2008


Hello,

On Thu, 31 Jan 2008 14:44:17 +0200
Paul Sokolovsky <pmiscml at gmail.com> wrote:

[]
> 
> Ok, so at least we agree that overriding DISTRO without good reasons
> is superfluous, if not bad. Please see patch below. This actually
> leaves only Angstrom as overriding that variable.

Ok, that patch was applied, now one to actually preserve original
DISTRO value. Fully made per Richard's suggestions:

============================================================
--- classes/image.bbclass	4d92381733b09bae07a07da35bd0024744924c3c
+++ classes/image.bbclass	6eeae6a01c36465bc36cc737d42ea6b8ab09b152
@@ -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
============================================================
--- conf/bitbake.conf	5044eed5572b1c9c12c31cf7952ccedc1648524c
+++ conf/bitbake.conf	3c7aa4886bde62462e9fcbbb9bbd4324bdee89af
@@ -529,6 +531,10 @@ include conf/local.conf
 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
============================================================
--- conf/distro/include/angstrom.inc	6d2902857b621e681b3f0d4780dcd51ee236074e
+++ conf/distro/include/angstrom.inc	e5988ce8ee4aed5e7c532ed792c344cc08b7f3c4
@@ -1,7 +1,9 @@
 #@TYPE: Distribution
 #@NAME: Angstrom 
 #@DESCRIPTION: Release independent distribution configuration for Angstrom
 
+# Preserve original DISTRO value
+USERDISTRO := "${DISTRO}"
 DISTRO = "angstrom"
 DISTRO_NAME = "Angstrom"
 


[]


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




More information about the Openembedded-devel mailing list