diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-03-28 22:07:02 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-03-31 15:34:07 +0100 |
commit | b2996efc015bc5ae0b8246924083e76fb5129cea (patch) | |
tree | 367c71662a71f075bc4ea9bb84c1cb02dbab7c5e /meta/recipes-extended/libzypp/libzypp_git.bb | |
parent | 7178a540b35a4a5e4a5e0546eb0c2207d2033cdf (diff) | |
download | openembedded-core-b2996efc015bc5ae0b8246924083e76fb5129cea.tar.gz openembedded-core-b2996efc015bc5ae0b8246924083e76fb5129cea.tar.bz2 openembedded-core-b2996efc015bc5ae0b8246924083e76fb5129cea.zip |
Fix integration of zypper and sat-solver
Adjust the integration of zypper and sat-solver to ensure that all of the
defined architectures for a given machine are defined identically to Poky.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-extended/libzypp/libzypp_git.bb')
-rw-r--r-- | meta/recipes-extended/libzypp/libzypp_git.bb | 97 |
1 files changed, 76 insertions, 21 deletions
diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb index 621ce45da4..809c1877f5 100644 --- a/meta/recipes-extended/libzypp/libzypp_git.bb +++ b/meta/recipes-extended/libzypp/libzypp_git.bb @@ -13,16 +13,14 @@ RDEPENDS_${PN} = "sat-solver" S = "${WORKDIR}/git" PV = "0.0-git${SRCPV}" -PR = "r8" +PR = "r9" SRC_URI = "git://gitorious.org/opensuse/libzypp.git;protocol=git \ file://no-doc.patch \ file://rpm5.patch \ file://rpm5-no-rpmdbinit.patch \ - file://builtin-arch.patch;apply=no \ - file://no-builtin-arch.patch;apply=no \ - file://archconf.patch;apply=no \ file://config-release.patch \ + file://libzypp-pokyarch.patch \ " SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch" @@ -34,23 +32,80 @@ EXTRA_OECMAKE += "-DLIB=lib" PACKAGE_ARCH = "${MACHINE_ARCH}" -do_archpatch () { - PKG_ARCH_TAIL=`sed -n ${S}/zypp/Arch.cc -e "s|^.*defCompatibleWith( _${BASE_PACKAGE_ARCH},[ \t]*\(.*\) .*$|\1|p"` - if [ "x${PKG_ARCH_TAIL}" == x ]; then - PATCHFILE=${WORKDIR}/no-builtin-arch.patch - else - PATCHFILE=${WORKDIR}/builtin-arch.patch - fi +do_archgen () { + # We need to dynamically generate our arch file based on the machine + # configuration + echo "/* Automatically generated by the libzypp recipes */" > zypp/poky-arch.h + echo "" >> zypp/poky-arch.h + echo "#ifndef POKY_ARCH_H" >> zypp/poky-arch.h + echo "#define POKY_ARCH_H 1" >> zypp/poky-arch.h + echo "#define Arch_machine Arch_${MACHINE_ARCH}" >> zypp/poky-arch.h + echo "#endif /* POKY_ARCH_H */" >> zypp/poky-arch.h + echo "" >> zypp/poky-arch.h + echo "#ifdef DEF_BUILTIN" >> zypp/poky-arch.h + echo "/* Specify builtin types */" >> zypp/poky-arch.h + for each_arch in ${PACKAGE_ARCHS} ; do + case "$each_arch" in + all | any | noarch) + continue;; + esac + echo " DEF_BUILTIN( ${each_arch} );" >> zypp/poky-arch.h + done + echo "#endif /* DEF_BUILTIN */" >> zypp/poky-arch.h + echo "" >> zypp/poky-arch.h + echo "#ifdef POKY_EXTERN_PROTO" >> zypp/poky-arch.h + echo "/* Specify extern prototypes */" >> zypp/poky-arch.h + for each_arch in ${PACKAGE_ARCHS} ; do + case "$each_arch" in + all | any | noarch) + continue;; + esac + echo " extern const Arch Arch_${each_arch};" >> zypp/poky-arch.h + done + echo "#endif /* POKY_EXTERN_PROTO */" >> zypp/poky-arch.h + echo "" >> zypp/poky-arch.h + echo "#ifdef POKY_PROTO" >> zypp/poky-arch.h + echo "/* Specify prototypes */" >> zypp/poky-arch.h + for each_arch in ${PACKAGE_ARCHS} ; do + case "$each_arch" in + all | any | noarch) + continue;; + esac + echo " const Arch Arch_${each_arch} (_${each_arch});" >> zypp/poky-arch.h + done + echo "#endif /* POKY_PROTO */" >> zypp/poky-arch.h + echo "" >> zypp/poky-arch.h + echo "#ifdef POKY_DEF_COMPAT" >> zypp/poky-arch.h + echo "/* Specify compatibility information */" >> zypp/poky-arch.h + INSTALL_PLATFORM_ARCHS="" + for each_arch in ${PACKAGE_ARCHS} ; do + INSTALL_PLATFORM_ARCHS="$each_arch $INSTALL_PLATFORM_ARCHS" + done - sed -i "${PATCHFILE}" \ - -e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g" \ - -e "s|@PKG_ARCH@|${BASE_PACKAGE_ARCH}|g" \ - -e "s|@PKG_ARCH_TAIL@|${PKG_ARCH_TAIL}|g" - - patch -p1 -i "${PATCHFILE}" - - sed -i ${WORKDIR}/archconf.patch -e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g" - patch -p1 -i ${WORKDIR}/archconf.patch + COMPAT_WITH="" + set -- ${INSTALL_PLATFORM_ARCHS} + while [ $# -gt 0 ]; do + case "$1" in + all | any | noarch) + shift ; continue;; + esac + ARCH=_"$1" + shift + COMPAT="" + for each_arch in "$@"; do + if [ -z "$COMPAT" ]; then + COMPAT=_"$each_arch" + else + COMPAT=_"$each_arch,$COMPAT" + fi + done + COMPAT_WITH="${ARCH},${COMPAT} $COMPAT_WITH" + done + for each_compat in ${COMPAT_WITH} ; do + echo " defCompatibleWith( ${each_compat} );" >> zypp/poky-arch.h + done + echo "#endif /* DEF_COMPAT */" >> zypp/poky-arch.h + echo "" >> zypp/poky-arch.h } -addtask archpatch before do_patch after do_unpack +addtask archgen before do_configure after do_patch |