[oe-commits] org.oe.dev bitbake.conf, image.bbclass: Add and use USERDISTRO var to preserve original DISTRO value.

pfalcon commit openembedded-commits at lists.openembedded.org
Tue Feb 12 21:16:42 UTC 2008


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.

Author: pfalcon at openembedded.org
Branch: org.openembedded.dev
Revision: 242687582dbdcc1fdca2fc9af1f32a2b5c591f3c
ViewMTN: http://monotone.openembedded.org/revision/info/242687582dbdcc1fdca2fc9af1f32a2b5c591f3c
Files:
1
classes/image.bbclass
conf/bitbake.conf
conf/distro/include/angstrom.inc
Diffs:

#
# mt diff -r465f9c73626153a7e195a5b8c08ae66282c3722f -r242687582dbdcc1fdca2fc9af1f32a2b5c591f3c
#
# 
# 
# patch "classes/image.bbclass"
#  from [4d92381733b09bae07a07da35bd0024744924c3c]
#    to [6eeae6a01c36465bc36cc737d42ea6b8ab09b152]
# 
# patch "conf/bitbake.conf"
#  from [07bc2ee707d6a2bd35d0bb19d32d15965edbc443]
#    to [040778b31ab6668f50df7d840d46fd1abbc7c6cf]
# 
# patch "conf/distro/include/angstrom.inc"
#  from [4d1526781ebb7597c88e73634334df7f541a5e6b]
#    to [b86b952c90304d1fd39f1415f6af7f71d02e00df]
# 
============================================================
--- 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	07bc2ee707d6a2bd35d0bb19d32d15965edbc443
+++ conf/bitbake.conf	040778b31ab6668f50df7d840d46fd1abbc7c6cf
@@ -529,6 +529,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	4d1526781ebb7597c88e73634334df7f541a5e6b
+++ conf/distro/include/angstrom.inc	b86b952c90304d1fd39f1415f6af7f71d02e00df
@@ -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"
 






More information about the Openembedded-commits mailing list