summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-02-08 09:53:47 -0700
committerChris Larson <chris_larson@mentor.com>2011-02-08 09:53:48 -0700
commit16e296b918e3a897153e2c93133bd9dbb6ae17c4 (patch)
tree86fd9de0e2f69acf6d81c5c0151a5ae2e2242602
parenta4e8313927d60f06cd5f82d56742bb06b9fbfdfe (diff)
downloadbitbake-16e296b918e3a897153e2c93133bd9dbb6ae17c4.tar.gz
build: improve set -x handling
- set -x always, not just when debugging - set -x immediately before executing the function, rather than at the top of the script, so the output is no longer cluttered with all the variable and function definitions Signed-off-by: Chris Larson <chris_larson@mentor.com>
-rw-r--r--lib/bb/build.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index ff2d55ec2..eb2306ea3 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -220,10 +220,9 @@ def exec_func_shell(function, d, runfile, logfile, cwd=None, fakeroot=False):
with open(runfile, 'w') as script:
script.write('#!/bin/sh -e\n')
- if logger.isEnabledFor(logging.DEBUG):
- script.write("set -x\n")
data.emit_func(function, script, d)
+ script.write("set -x\n")
script.write("%s\n" % function)
os.fchmod(script.fileno(), 0775)