[OE-core] [PATCH] perf: fix the check

rongqing.li at windriver.com rongqing.li at windriver.com
Fri Aug 21 08:06:01 UTC 2015


From: Roy Li <rongqing.li at windriver.com>

$(grep xxx xxx) never returns 0, it maybe return empty or a string, and
can not compare with 0

Signed-off-by: Roy Li <rongqing.li at windriver.com>
---
 meta/recipes-kernel/perf/perf.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 246f1b4..0aff9fb 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -111,7 +111,7 @@ do_install() {
 	unset CFLAGS
 	oe_runmake DESTDIR=${D} install
 	# we are checking for this make target to be compatible with older perf versions
-	if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0" ]; then
+	if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ] && grep -q install-python_ext ${S}/tools/perf/Makefile; then
 		oe_runmake DESTDIR=${D} install-python_ext
 	fi
 }
-- 
1.9.1




More information about the Openembedded-core mailing list