summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_deb.bbclass
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2012-09-20 12:56:59 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-20 13:33:50 +0100
commit42d91a7db404bacc50541e1813c537d9c260ffb4 (patch)
tree5ffa8dd4259197731192f3e6b2d47fc93b3c2f62 /meta/classes/package_deb.bbclass
parent82a08d42ffddc4d955706ebe2e0078134574a6ba (diff)
downloadpoky-42d91a7db404bacc50541e1813c537d9c260ffb4.tar.gz
Replace "echo -e" with "printf" to have the same behavior in dash or bash
oe-core removed the prerequisite to have sh as bash. POSIX doesn't define any options and furthermore allows 'echo -e' to be the default behavior. This means that in dash 'echo -e' will actually print '-e' and interpret backslashes by default. We use instead 'printf' builtin command with or without '\n' to simulate 'echo -e' or 'echo -n'. 'printf' needs format while 'echo' can be used without any arguments. So 'echo >' was replaced by 'printf "" >'. 'echo' without '-n' flag adds a new line by default so to keep the same behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is used. [YOCTO #3138] (From OE-Core rev: a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_deb.bbclass')
-rw-r--r--meta/classes/package_deb.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 48511dfe90..3b42d3b194 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -192,7 +192,7 @@ deb_log_check() {
192 if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1 192 if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1
193 then 193 then
194 echo "log_check: There were error messages in the logfile" 194 echo "log_check: There were error messages in the logfile"
195 echo -e "log_check: Matched keyword: [$keyword_die]\n" 195 printf "log_check: Matched keyword: [$keyword_die]\n\n"
196 echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die" 196 echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
197 echo "" 197 echo ""
198 do_exit=1 198 do_exit=1