* [PATCH] testlab.bbclass: use opkg.conf from staging, always specify tmp_dir in opkg-cl call with -t parameter
@ 2010-02-24 19:22 Martin Jansa
2010-02-24 20:43 ` Denys Dmytriyenko
2010-02-25 8:07 ` Koen Kooi
0 siblings, 2 replies; 3+ messages in thread
From: Martin Jansa @ 2010-02-24 19:22 UTC (permalink / raw)
To: openembedded-devel; +Cc: Koen Kooi
* 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>
---
classes/testlab.bbclass | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/classes/testlab.bbclass b/classes/testlab.bbclass
index fc923c5..e6c9c8e 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
--
1.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] testlab.bbclass: use opkg.conf from staging, always specify tmp_dir in opkg-cl call with -t parameter
2010-02-24 19:22 [PATCH] testlab.bbclass: use opkg.conf from staging, always specify tmp_dir in opkg-cl call with -t parameter Martin Jansa
@ 2010-02-24 20:43 ` Denys Dmytriyenko
2010-02-25 8:07 ` Koen Kooi
1 sibling, 0 replies; 3+ messages in thread
From: Denys Dmytriyenko @ 2010-02-24 20:43 UTC (permalink / raw)
To: openembedded-devel; +Cc: Koen Kooi
On Wed, Feb 24, 2010 at 08:22:47PM +0100, Martin Jansa wrote:
> * 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>
Looks fine to me.
Acked-by: Denys Dmytriyenko <denis@denix.org>
> ---
> classes/testlab.bbclass | 13 +++++++++----
> 1 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/classes/testlab.bbclass b/classes/testlab.bbclass
> index fc923c5..e6c9c8e 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
> --
> 1.7.0
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] testlab.bbclass: use opkg.conf from staging, always specify tmp_dir in opkg-cl call with -t parameter
2010-02-24 19:22 [PATCH] testlab.bbclass: use opkg.conf from staging, always specify tmp_dir in opkg-cl call with -t parameter Martin Jansa
2010-02-24 20:43 ` Denys Dmytriyenko
@ 2010-02-25 8:07 ` Koen Kooi
1 sibling, 0 replies; 3+ messages in thread
From: Koen Kooi @ 2010-02-25 8:07 UTC (permalink / raw)
To: Martin Jansa; +Cc: openembedded-devel
Acked--by: Koen Kooi <koen@openembedded.org>
Op 24 feb 2010, om 20:22 heeft Martin Jansa het volgende geschreven:
> * 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>
> ---
> classes/testlab.bbclass | 13 +++++++++----
> 1 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/classes/testlab.bbclass b/classes/testlab.bbclass
> index fc923c5..e6c9c8e 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
> --
> 1.7.0
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-02-25 8:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-24 19:22 [PATCH] testlab.bbclass: use opkg.conf from staging, always specify tmp_dir in opkg-cl call with -t parameter Martin Jansa
2010-02-24 20:43 ` Denys Dmytriyenko
2010-02-25 8:07 ` Koen Kooi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.