diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-02-28 13:37:41 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-28 13:47:10 +0000 |
commit | 0e39107047f3403757ba015fce77ce65d2e5fb43 (patch) | |
tree | eb038cf85f66c2e756d5455821871be35f205bc1 /bitbake | |
parent | 8fbdf5faa69c0134a2b517883c6b5372e32f3b8d (diff) | |
download | poky-0e39107047f3403757ba015fce77ce65d2e5fb43.tar.gz |
bitbake: implement BB_VERBOSE_LOGS
Enable configuring whether "set +x" is added to all shell tasks rather
than forcing it; this is enabled by setting BB_VERBOSE_LOGS to 1.
(Bitbake rev: 659411b6bb30e1a8355afc1c29b8170a8f2b55ac)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/build.py | 3 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/msg.py | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index b7031ab6d3..e390bec51f 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -229,7 +229,8 @@ def exec_func_shell(function, d, runfile, cwd=None): | |||
229 | script.write('#!/bin/sh -e\n') | 229 | script.write('#!/bin/sh -e\n') |
230 | data.emit_func(function, script, d) | 230 | data.emit_func(function, script, d) |
231 | 231 | ||
232 | script.write("set -x\n") | 232 | if bb.msg.loggerVerboseLogs: |
233 | script.write("set -x\n") | ||
233 | if cwd: | 234 | if cwd: |
234 | script.write("cd %s\n" % cwd) | 235 | script.write("cd %s\n" % cwd) |
235 | script.write("%s\n" % function) | 236 | script.write("%s\n" % function) |
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 6ddd960860..ea09c5d68b 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -206,6 +206,10 @@ class BBCooker: | |||
206 | 206 | ||
207 | def parseConfiguration(self): | 207 | def parseConfiguration(self): |
208 | 208 | ||
209 | # Set log file verbosity | ||
210 | verboselogs = bb.utils.to_boolean(self.configuration.data.getVar("BB_VERBOSE_LOGS", "0")) | ||
211 | if verboselogs: | ||
212 | bb.msg.loggerVerboseLogs = True | ||
209 | 213 | ||
210 | # Change nice level if we're asked to | 214 | # Change nice level if we're asked to |
211 | nice = self.configuration.data.getVar("BB_NICE_LEVEL", True) | 215 | nice = self.configuration.data.getVar("BB_NICE_LEVEL", True) |
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py index 20d9bdd726..9b393252f3 100644 --- a/bitbake/lib/bb/msg.py +++ b/bitbake/lib/bb/msg.py | |||
@@ -100,6 +100,7 @@ class BBLogFilter(object): | |||
100 | 100 | ||
101 | loggerDefaultDebugLevel = 0 | 101 | loggerDefaultDebugLevel = 0 |
102 | loggerDefaultVerbose = False | 102 | loggerDefaultVerbose = False |
103 | loggerVerboseLogs = False | ||
103 | loggerDefaultDomains = [] | 104 | loggerDefaultDomains = [] |
104 | 105 | ||
105 | def init_msgconfig(verbose, debug, debug_domains = []): | 106 | def init_msgconfig(verbose, debug, debug_domains = []): |
@@ -108,6 +109,8 @@ def init_msgconfig(verbose, debug, debug_domains = []): | |||
108 | """ | 109 | """ |
109 | bb.msg.loggerDefaultDebugLevel = debug | 110 | bb.msg.loggerDefaultDebugLevel = debug |
110 | bb.msg.loggerDefaultVerbose = verbose | 111 | bb.msg.loggerDefaultVerbose = verbose |
112 | if verbose: | ||
113 | bb.msg.loggerVerboseLogs = True | ||
111 | bb.msg.loggerDefaultDomains = debug_domains | 114 | bb.msg.loggerDefaultDomains = debug_domains |
112 | 115 | ||
113 | def addDefaultlogFilter(handler): | 116 | def addDefaultlogFilter(handler): |