Skip to contentSkip to conversation

Richard Purdie : build.py: Only use set -x when debug is enabled

PATCH [email protected] 1 participant 1 message Jan 5, 2012

lore
Share & tools
lore
#0 lore raw
Module: bitbake.git
Branch: master-poky
Commit: ebaa9dc62246635efa634b7330d97606c6c02eb4
URL:    http://git.openembedded.org/?p=bitbake.git&a=commit;h=ebaa9dc62246635efa634b7330d97606c6c02eb4
Author: Richard Purdie <[email protected]>
Date:   Wed Jun  8 20:28:31 2011 +0100

build.py: Only use set -x when debug is enabled

---

 lib/bb/build.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
lib/bb/build.py +2 -2
index 1a47fc5..aabc1b6 100644
@@ -222,9 +222,9 @@ def exec_func_shell(function, d, runfile, cwd=None):
 
     with open(runfile, 'w') as script:
         script.write('#!/bin/sh -e\n')
+        if bb.msg.loggerDefaultVerbose:
+            script.write("set -x\n")
         data.emit_func(function, script, d)
-
-        script.write("set -x\n")
         if cwd:
             script.write("cd %s\n" % cwd)
         script.write("%s\n" % function)