diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2010-02-24 09:22:47 +0000 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2010-02-25 09:37:02 +0100 |
commit | 13555b5d9620b78e6e4d8f88de551f79a90e76c6 (patch) | |
tree | 2fefd5a512f4bf95ccad5922b3fc5050afbc629e /classes/testlab.bbclass | |
parent | 2f3568adab6d26f8f5c6beedd339998a5ed3a9b5 (diff) |
testlab.bbclass: use opkg.conf from staging, always specify tmp_dir in opkg-cl call with -t parameter
* Use opkg.conf from staging in the same way as do_rootfs does
* When option tmp_dir is used in opkg.conf installed on rootfs then it's
used also in do_rootfs call and points to probably non-existent directory
on buildhost like /var/lib/opkg/tmp.
* The value of tmp_dir from rootfs is used even with another config file
specified with -c parameter
* Before this, it was using default value (/tmp) on buildhost, now it will use
own "${IMAGE_ROOTFS}-tmp" and remove it after do_rootfs finish
(usually already empty inside, cleaned by opkg itself)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Acked-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Diffstat (limited to 'classes/testlab.bbclass')
-rw-r--r-- | classes/testlab.bbclass | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/classes/testlab.bbclass b/classes/testlab.bbclass index fc923c5112..e6c9c8e284 100644 --- a/classes/testlab.bbclass +++ b/classes/testlab.bbclass @@ -24,26 +24,31 @@ do_testlab() { if [ -e ${IMAGE_ROOTFS}/etc/opkg ] && [ "${ONLINE_PACKAGE_MANAGEMENT}" = "full" ] ; then + IPKG_TMP_DIR="${IMAGE_ROOTFS}-tmp" + IPKG_ARGS="-f ${STAGING_ETCDIR_NATIVE}/opkg.conf -o ${IMAGE_ROOTFS} -t ${IPKG_TMP_DIR}" + TESTLAB_DIR="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-testlab" mkdir -p ${TESTLAB_DIR}/ + mkdir -p ${IPKG_TMP_DIR}/ ls -laR ${IMAGE_ROOTFS} > ${TESTLAB_DIR}/files-in-image.txt echo > ${TESTLAB_DIR}/installed-packages.txt echo -e "digraph depends {\n node [shape=plaintext]" > ${TESTLAB_DIR}/depends.dot - for pkg in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} list_installed | awk '{print $1}') ; do - opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info $pkg | awk '/Package/ {printf $2"_"} /Version/ {printf $2"_"} /Archi/ {print $2".ipk"}' >> ${TESTLAB_DIR}/installed-packages.txt + for pkg in $(opkg-cl ${IPKG_ARGS} list_installed | awk '{print $1}') ; do + opkg-cl ${IPKG_ARGS} info $pkg | awk '/Package/ {printf $2"_"} /Version/ {printf $2"_"} /Archi/ {print $2".ipk"}' >> ${TESTLAB_DIR}/installed-packages.txt - for depends in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info $pkg | grep Depends) ; do + for depends in $(opkg-cl ${IPKG_ARGS} info $pkg | grep Depends) ; do echo "$pkg OPP $depends;" | grep -v "(" | grep -v ")" | grep -v Depends | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot done - for recommends in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info $pkg | grep Recom) ; do + for recommends in $(opkg-cl ${IPKG_ARGS} info $pkg | grep Recom) ; do echo "$pkg OPP $recommends [style=dotted];" | grep -v "(" | grep -v ")" | grep -v Recom | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot done done echo "}" >> ${TESTLAB_DIR}/depends.dot + rm -rf ${IPKG_TMP_DIR} grep -v kernel_2 ${TESTLAB_DIR}/depends.dot | grep -v kernel_image > ${TESTLAB_DIR}/depends-nokernel.dot grep -v libc6 ${TESTLAB_DIR}/depends-nokernel.dot | grep -v libgcc > ${TESTLAB_DIR}/depends-nokernel-nolibc.dot |