diff options
author | Koen Kooi <koen@openembedded.org> | 2010-10-19 09:43:43 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-10-19 09:43:43 +0200 |
commit | cc8bc6d24866c29fbb01c6206d3b8e06c1434987 (patch) | |
tree | 649467a9813ba32d35caa4d27d517339eee785c0 /classes | |
parent | 1f279775abd2e2a7d6813019cd9697eec3c66501 (diff) | |
download | openembedded-cc8bc6d24866c29fbb01c6206d3b8e06c1434987.tar.gz |
image bbclass: fix install_linguas usage on shared buildservers
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image.bbclass | 18 |
1 files changed, 11 insertions, 7 deletions
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` |