diff options
author | Andrei Gherzan <andrei@gherzan.ro> | 2012-09-20 12:56:59 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-20 13:33:50 +0100 |
commit | 42d91a7db404bacc50541e1813c537d9c260ffb4 (patch) | |
tree | 5ffa8dd4259197731192f3e6b2d47fc93b3c2f62 /meta/classes/package_ipk.bbclass | |
parent | 82a08d42ffddc4d955706ebe2e0078134574a6ba (diff) | |
download | poky-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_ipk.bbclass')
-rw-r--r-- | meta/classes/package_ipk.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index e94586e6ca..efe299eec8 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
@@ -181,7 +181,7 @@ ipk_log_check() { | |||
181 | if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1 | 181 | if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1 |
182 | then | 182 | then |
183 | echo "log_check: There were error messages in the logfile" | 183 | echo "log_check: There were error messages in the logfile" |
184 | echo -e "log_check: Matched keyword: [$keyword_die]\n" | 184 | printf "log_check: Matched keyword: [$keyword_die]\n\n" |
185 | echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die" | 185 | echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die" |
186 | echo "" | 186 | echo "" |
187 | do_exit=1 | 187 | do_exit=1 |