From 42d91a7db404bacc50541e1813c537d9c260ffb4 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] (From OE-Core rev: a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3) Signed-off-by: Andrei Gherzan Signed-off-by: Richard Purdie --- meta/recipes-extended/libzypp/libzypp_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta/recipes-extended/libzypp') diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb index 3a323e7e15..1729c78a20 100644 --- a/meta/recipes-extended/libzypp/libzypp_git.bb +++ b/meta/recipes-extended/libzypp/libzypp_git.bb @@ -106,10 +106,10 @@ do_archgen () { continue;; esac if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then - echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h + printf " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h echo "(_${each_arch});" | tr - _ >> zypp/oe-arch.h else - echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h + printf " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h echo "( IdString ( \"${each_arch}\" ) );" | tr - _ >> zypp/oe-arch.h fi done -- cgit v1.2.3-54-g00ecf