From patchwork Tue Jul 24 13:49:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: bzip2-native: fix problems when bzip2-native is installed in parallel Date: Tue, 24 Jul 2012 13:49:59 -0000 From: Yao Zhao X-Patchwork-Id: 32937 Message-Id: <1343137799-12032-1-git-send-email-yao.zhao@windriver.com> To: openembedded-core@lists.openembedded.org 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 --- 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}/