Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/4] scripts/bitbake: pass through debug options to initial pseudo build
Date: Tue, 14 Feb 2012 13:22:24 +0000	[thread overview]
Message-ID: <0e9d34790d483bc9fcfe0d74bb325b22df98b91c.1329225663.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1329225663.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1329225663.git.paul.eggleton@linux.intel.com>

If you specify -D or -v options to the bitbake wrapper script, and the
initial pseudo build needs to be done, it's useful to pass these
options through to that command so that you can debug the initial
pseudo build as well.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/bitbake |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/scripts/bitbake b/scripts/bitbake
index 1c8d4eb..dda3b26 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -4,6 +4,7 @@ export BBFETCH2=True
 export BB_ENV_EXTRAWHITE="PSEUDO_BUILD PSEUDO_DISABLED $BB_ENV_EXTRAWHITE"
 
 NO_BUILD_OPTS="--version -h --help -p --parse-only -s --show-versions -e --environment -g --graphviz"
+PASSTHROUGH_OPTS="-D -DD -DDD -DDDD -v"
 needpseudo="1"
 for opt in $@; do
 for key in $NO_BUILD_OPTS; do
@@ -69,7 +70,18 @@ if [ $buildpseudo = "1" ]; then
     if [ $needtar = "0" ]; then
         TARTARGET=""
     fi
-    bitbake pseudo-native $TARTARGET -c populate_sysroot
+    # Pass through debug options
+    additionalopts=""
+    for opt in $@; do
+        for key in $PASSTHROUGH_OPTS; do
+            if [ $opt = $key ]
+            then
+                additionalopts="$additionalopts $opt"
+                break
+            fi
+        done
+    done
+    bitbake pseudo-native $TARTARGET $additionalopts -c populate_sysroot
     ret=$?
     if [ "$ret" != "0" ]; then
         exit 1
-- 
1.7.5.4




  reply	other threads:[~2012-02-14 13:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14 13:22 [PATCH 0/4] Misc tidy-ups Paul Eggleton
2012-02-14 13:22 ` Paul Eggleton [this message]
2012-02-14 13:22 ` [PATCH 2/4] conf/bitbake.conf: remove Opie definitions Paul Eggleton
2012-02-14 13:22 ` [PATCH 3/4] classes/sdl: remove Opie-specific desktop file/packaging Paul Eggleton
2012-02-14 13:22 ` [PATCH 4/4] stat: remove NATIVE_INSTALL_WORKS Paul Eggleton
2012-02-21 14:58 ` [PATCH 0/4] Misc tidy-ups Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e9d34790d483bc9fcfe0d74bb325b22df98b91c.1329225663.git.paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox