[OE-core] [PATCH] gzip: fix MakeMaker issues with using wrong SHELL/GREP

Ming Liu ming.liu at windriver.com
Thu Nov 28 10:26:29 UTC 2013

Paths of shell/grep is being determined by detecting from host at configure
stage, and then will be hard coded into scripts like zgrep, this would
cause a following runtime error:
"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"

Fixed by using runtime paths instead.

Signed-off-by: Ming Liu <ming.liu at windriver.com>
 meta/recipes-extended/gzip/gzip.inc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc
index 6ec1dae..4b265a6 100644
--- a/meta/recipes-extended/gzip/gzip.inc
+++ b/meta/recipes-extended/gzip/gzip.inc
@@ -12,6 +12,11 @@ SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
 inherit autotools
+do_configure_prepend () {
+	sed '\#|/bin/sh|\$(SHELL)|#d' -i Makefile.am
+	sed 's#\(|\[@\]GREP@|\)\$(GREP)#\1/bin/grep#g' -i Makefile.am
 do_install_append () {
 	# Rename and move files into /bin (FHS), which is typical place for gzip
 	install -d ${D}${base_bindir}

More information about the Openembedded-core mailing list