summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
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/recipes-extended
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/recipes-extended')
-rw-r--r--meta/recipes-extended/libzypp/libzypp_git.bb4
-rw-r--r--meta/recipes-extended/lsb/lsb_4.1.bb6
2 files changed, 5 insertions, 5 deletions
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 () {
106 continue;; 106 continue;;
107 esac 107 esac
108 if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then 108 if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then
109 echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h 109 printf " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h
110 echo "(_${each_arch});" | tr - _ >> zypp/oe-arch.h 110 echo "(_${each_arch});" | tr - _ >> zypp/oe-arch.h
111 else 111 else
112 echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h 112 printf " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h
113 echo "( IdString ( \"${each_arch}\" ) );" | tr - _ >> zypp/oe-arch.h 113 echo "( IdString ( \"${each_arch}\" ) );" | tr - _ >> zypp/oe-arch.h
114 fi 114 fi
115 done 115 done
diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb
index a3242db708..55ea241783 100644
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -31,12 +31,12 @@ do_install(){
31 mkdir -p ${D}${base_bindir} 31 mkdir -p ${D}${base_bindir}
32 mkdir -p ${D}/${baselib} 32 mkdir -p ${D}/${baselib}
33 mkdir -p ${D}${sysconfdir}/lsb-release.d 33 mkdir -p ${D}${sysconfdir}/lsb-release.d
34 echo -n "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release 34 printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
35 35
36 if [ "${TARGET_ARCH}" = "i586" ];then 36 if [ "${TARGET_ARCH}" = "i586" ];then
37 echo -n "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release 37 printf "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release
38 else 38 else
39 echo -n "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release 39 printf "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release
40 fi 40 fi
41 echo "\"" >> ${D}${sysconfdir}/lsb-release 41 echo "\"" >> ${D}${sysconfdir}/lsb-release
42 echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release 42 echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release