Patchwork elfutils: fix the condition check before remove eu-objdump

login
register
mail settings
Submitter rongqing.li@windriver.com
Date Nov. 26, 2013, 5:17 a.m.
Message ID <1385443029-15848-1-git-send-email-rongqing.li@windriver.com>
Download mbox | patch
Permalink /patch/62355/
State New
Headers show

Comments

rongqing.li@windriver.com - Nov. 26, 2013, 5:17 a.m.
From: Roy Li <rongqing.li@windriver.com>

"grep -q" does not write anything to standard output, the result is same as 
a empty string, The second test becomes [!""] which is a fixed true value 

Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
 meta/recipes-devtools/elfutils/elfutils_0.155.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-devtools/elfutils/elfutils_0.155.bb b/meta/recipes-devtools/elfutils/elfutils_0.155.bb
index 594dfb0..14eac26 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.155.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.155.bb
@@ -48,7 +48,7 @@  do_configure_prepend() {
 }
 
 do_install_append() {
-	if [ "${TARGET_ARCH}" != "x86_64" ] && [ ! `echo "${TARGET_ARCH}"|grep -q 'i.86'` ];then
+	if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
 		rm ${D}${bindir}/eu-objdump
 	fi
 }