mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
d0382d5c88
commit
43493742a0
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user