aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2011-04-21 16:56:49 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-04-28 09:52:28 +0100
commit5857516404411040598b69c85d184ccdfc0af2e0 (patch)
treed44b297ea877bc02fc5b756ca5772ab6272e4ce2 /meta/classes/base.bbclass
parentbe3c2c8a5e16d392ff7b9910fa0124da09e4c72e (diff)
downloadopenembedded-core-5857516404411040598b69c85d184ccdfc0af2e0.tar.gz
logging: fix oedebug loglevel test
When the existing test for loglevel fails, the syntax used results in the recipe exiting with a silent failure. Performing any bash command after the test block resolves the problem, such as "shift" or "echo ''". Rewriting with 'if []; then' blocks provides a cleaner syntax and also resolves the failure. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 44fab53405..7ca396db5e 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -53,15 +53,15 @@ oefatal() {
}
oedebug() {
- test $# -ge 2 || {
+ if [ $# -lt 2]; then
echo "Usage: oedebug level \"message\""
exit 1
- }
+ fi
- test ${OEDEBUG:-0} -ge $1 && {
+ if [ ${OEDEBUG:-0} -ge $1 ]; then
shift
echo "DEBUG:" $*
- }
+ fi
}
oe_runmake() {