Skip to contentSkip to conversation

fixing bug #625

PATCH Applied Lianhao Lu 2 participants 3 messages Jan 5, 2011

lore
Share & tools
lore

Lianhao Lu

author
#0 lore raw

cover fixing bug #625

Skip building pseudo if the options passing to the bitbake contains one of the followings:
--version
-h
--help
-p
--parse-only
-s
--show-versions
-e
--environment

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: llu/bug625
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/bug625

Thanks,
Lianhao Lu <[email protected]>
---

Lianhao Lu (1):
scripts/bitbake: Skip building pseudo if necessary.

 scripts/bitbake |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)
author
#1 lore raw

PATCH 1/1 scripts/bitbake: Skip building pseudo if necessary.

Fixed [BUGID# 625]. Skip building pseudo if necessary by parsing the options to bitbake.

---
 scripts/bitbake |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)
scripts/bitbake +21 -3
index 2c03314..df4e215 100755
@@ -1,7 +1,20 @@
 #!/bin/sh
+NO_BUILD_OPTS="--version -h --help -p --parse-only -s --show-versions -e --environment"
+no_build="0"
+for opt in $@; do
+for key in $NO_BUILD_OPTS; do
+    if [ $opt == $key ]
+    then
+        no_build="1"
+        break
+    fi
+done
+[ $no_build == "1" ] && break
+done
+
 OLDPATH=$PATH
 export PATH=`echo $PATH | sed s#[^:]*/scripts:##`
-if [ ! -e "$BUILDDIR/pseudodone" ]; then
+if [ ! -e "$BUILDDIR/pseudodone" -a $no_build == "0" ]; then
     echo "Pseudo has not been built, building this first before the main build"
     bitbake pseudo-native
     ret=$?
@@ -19,7 +32,12 @@ if [ ! -e "$BUILDDIR/pseudodone" ]; then
 fi
 BITBAKE=`which bitbake`
 export PATH=$OLDPATH
-PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
-PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@
+if [ $no_build == "0" ]
+then
+    PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
+    PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@
+else
+    $BITBAKE $@
+fi
 ret=$?
 exit $ret
Signature · 1 line
1.7.0.4
#2 lore raw
In reply to Lianhao Lu
Quoted 11 lines · Lianhao Lu

Skip building pseudo if the options passing to the bitbake contains one of the followings:
--version
-h
--help
-p
--parse-only
-s
--show-versions
-e
--environment

Quoted 6 lines

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: llu/bug625
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/bug625

Thanks,
Lianhao Lu <[email protected]>

Merged into master, thanks.

Richard