summaryrefslogtreecommitdiffstats
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 10:44:44 +0100
commit43493742a06d9266033c93c97fb545e8755f8ae6 (patch)
tree97f24884f19a8d2e51261d5555d83de856c1e828 /meta/classes/base.bbclass
parentd0382d5c88ce4bc5e26950b45a713bfc6e6eab9f (diff)
downloadpoky-43493742a06d9266033c93c97fb545e8755f8ae6.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. (From OE-Core rev: 5857516404411040598b69c85d184ccdfc0af2e0) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 4fd83020d9..2dcbcb3dc9 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -53,15 +53,15 @@ oefatal() {
53} 53}
54 54
55oedebug() { 55oedebug() {
56 test $# -ge 2 || { 56 if [ $# -lt 2]; then
57 echo "Usage: oedebug level \"message\"" 57 echo "Usage: oedebug level \"message\""
58 exit 1 58 exit 1
59 } 59 fi
60 60
61 test ${OEDEBUG:-0} -ge $1 && { 61 if [ ${OEDEBUG:-0} -ge $1 ]; then
62 shift 62 shift
63 echo "DEBUG:" $* 63 echo "DEBUG:" $*
64 } 64 fi
65} 65}
66 66
67oe_runmake() { 67oe_runmake() {