From: Koen Kooi Date: Tue, 19 Oct 2010 07:43:43 +0000 (+0200) Subject: image bbclass: fix install_linguas usage on shared buildservers X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc8bc6d24866c29fbb01c6206d3b8e06c1434987;p=openembedded.git image bbclass: fix install_linguas usage on shared buildservers --- diff --git a/classes/image.bbclass b/classes/image.bbclass index a9a410740e..583e9c4036 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -283,26 +283,30 @@ install_linguas() { if [ -e ${IMAGE_ROOTFS}/usr/bin/opkg-cl ] ; then OPKG="opkg-cl ${IPKG_ARGS}" + mkdir -p ${IMAGE_ROOTFS}/tmp-locale + ${OPKG} update || true - ${OPKG} list_installed | awk '{print $1}' |sort | uniq > /tmp/installed-packages + ${OPKG} list_installed | awk '{print $1}' |sort | uniq > ${IMAGE_ROOTFS}/tmp-locale/installed-packages - for i in $(cat /tmp/installed-packages | grep -v locale) ; do + for i in $(cat ${IMAGE_ROOTFS}/tmp-locale/installed-packages | grep -v locale) ; do for translation in ${IMAGE_LINGUAS}; do translation_split=$(echo ${translation} | awk -F '-' '{print $1}') echo ${i}-locale-${translation} echo ${i}-locale-${translation_split} done - done | sort | uniq > /tmp/wanted-locale-packages + done | sort | uniq > ${IMAGE_ROOTFS}/tmp-locale/wanted-locale-packages - ${OPKG} list | awk '{print $1}' |grep locale |sort | uniq > /tmp/available-locale-packages + ${OPKG} list | awk '{print $1}' |grep locale |sort | uniq > ${IMAGE_ROOTFS}/tmp-locale/available-locale-packages - cat /tmp/wanted-locale-packages /tmp/available-locale-packages | sort | uniq -d > /tmp/pending-locale-packages + cat ${IMAGE_ROOTFS}/tmp-locale/wanted-locale-packages ${IMAGE_ROOTFS}/tmp-locale/available-locale-packages | sort | uniq -d > ${IMAGE_ROOTFS}/tmp-locale/pending-locale-packages - if [ -s /tmp/pending-locale-packages ] ; then - cat /tmp/pending-locale-packages | xargs ${OPKG} -nodeps install + if [ -s ${IMAGE_ROOTFS}/tmp-locale/pending-locale-packages ] ; then + cat ${IMAGE_ROOTFS}/tmp-locale/pending-locale-packages | xargs ${OPKG} -nodeps install fi rm -f ${IMAGE_ROOTFS}${libdir}/opkg/lists/* + rm -rf ${IMAGE_ROOTFS}/tmp-locale + for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.preinst; do if [ -f $i ] && ! sh $i; then opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst`