[oe-commits] Rick Foos : contrib/testing/testscript.sh: Detect MIN_BB_VERSION

git version control git at git.openembedded.org
Sat Feb 19 03:15:23 UTC 2011


Module: openembedded.git
Branch: master
Commit: f5a8b9cf63ae4cccf43f7705b0967fd3705783cd
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=f5a8b9cf63ae4cccf43f7705b0967fd3705783cd

Author: Rick Foos <rickfoosusa at gmail.com>
Date:   Fri Feb 18 19:13:24 2011 -0800

contrib/testing/testscript.sh: Detect MIN_BB_VERSION

* Fixes Bugzilla/5517
* extract the quoted string from BB_MIN_VERSION in config/sanity.conf.
  Should work for all versions of bitbake

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 contrib/testing/testscript.sh |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/contrib/testing/testscript.sh b/contrib/testing/testscript.sh
index 3c3927f..b6a0f88 100755
--- a/contrib/testing/testscript.sh
+++ b/contrib/testing/testscript.sh
@@ -23,17 +23,23 @@ fi
 # switch to the testing branch
 (cd openembedded; git checkout ${TESTING_BRANCH})
 
+[ -n "${DEFAULT_BB_MIN_VERSION}" ] || DEFAULT_BB_MIN_VERSION="1.10.2"
+[ -n "${OE_SANITY}" ] || OE_SANITY="openembedded/conf/sanity.conf"
+# get the current Bitbake minimum version from sanity.conf
+[ -n "${BB_MIN_VERSION}" ] || BB_MIN_VERSION=`grep BB_MIN_VERSION $OE_SANITY 2>nul| sed -e 's|.*\"\(.*\)\"|\1|'`
+[ -n "${BB_MIN_VERSION}" ] || BB_MIN_VERSION=$DEFAULT_BB_MIN_VERSION
+
 # test if bitbake exist; if not; fetch it and untar it
-if [ ! -d bitbake-1.10.2 ]
+if [ ! -d bitbake-${BB_MIN_VERSION} ]
 then
-    (wget http://download.berlios.de/bitbake/bitbake-1.10.2.tar.gz; tar xf bitbake-1.10.2.tar.gz; rm bitbake-1.10.2.tar.gz) 
+    (wget http://download.berlios.de/bitbake/bitbake-${BB_MIN_VERSION}.tar.gz; tar xf bitbake-${BB_MIN_VERSION}.tar.gz; rm bitbake-${BB_MIN_VERSION}.tar.gz) 
 fi
 
 # TOPDIR is where we are now
 TOPDIR=`pwd`
 
 # add bitbake to the path
-export PATH=${TOPDIR}/bitbake-1.10.2/bin:$PATH
+export PATH=${TOPDIR}/bitbake-${BB_MIN_VERSION}/bin:$PATH
 
 # create a local.conf by using a here document
 cat > ${TOPDIR}/openembedded/conf/local.conf << EOF





More information about the Openembedded-commits mailing list