[OE-core] [PATCH] bzip2-native: fix problems when bzip2-native is installed in parallel

Yao Zhao yao.zhao at windriver.com
Tue Jul 24 13:49:59 UTC 2012


when bzip2-native is installed in parallel to sysroot, it is possible that
some packages are using bzip2 to unpack, there are chances that bzip2 is
installed to sysroot but libbz2.so.0 not installed yet because parallel
installation.
link bzip2 and bzip2recover statically to avoid this problem and don't lose
parallel installation. libbz2.so is still available.

Signed-off-by: Yao Zhao <yao.zhao at windriver.com>
---
 meta/recipes-extended/bzip2/bzip2_1.0.6.bb |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
index 43b462a..4a0ad0c 100644
--- a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -25,6 +25,13 @@ ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_${PN} = "bunzip2 bzcat"
 
 do_configure_prepend () {
+	#link libbz2 statically to avoid problems when bzip2-native was
+	#installed parallel, libbz2.so.0 was not available but bzip2 is
+	if [ "${PN}" = "${BPN}-native" ]; then
+	  sed -i -e '/^bzip2_DEPENDENCIES/a bzip2_LDFLAGS = -static' \
+	    -e '/^bzip2recover_DEPENDENCIES/a bzip2recover_LDFLAGS = -static' \
+	    ${WORKDIR}/Makefile.am
+	fi
 	cp ${WORKDIR}/configure.ac ${S}/
 	cp ${WORKDIR}/Makefile.am ${S}/
 	cp ${STAGING_DATADIR_NATIVE}/automake*/install-sh ${S}/
-- 
1.7.9.5





More information about the Openembedded-core mailing list