From a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Thu, 20 Sep 2012 12:56:59 +0300 Subject: 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] Signed-off-by: Andrei Gherzan Signed-off-by: Richard Purdie --- meta/classes/package_deb.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/classes/package_deb.bbclass') 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() { if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1 then echo "log_check: There were error messages in the logfile" - echo -e "log_check: Matched keyword: [$keyword_die]\n" + printf "log_check: Matched keyword: [$keyword_die]\n\n" echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die" echo "" do_exit=1 -- cgit v1.2.3