All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: openembedded-devel@lists.openembedded.org
Cc: Koen Kooi <k.kooi@student.utwente.nl>
Subject: Re: [PATCH] testlab.bbclass: use opkg.conf from staging, always specify tmp_dir in opkg-cl call with -t parameter
Date: Wed, 24 Feb 2010 15:43:26 -0500	[thread overview]
Message-ID: <20100224204326.GA9601@denix.org> (raw)
In-Reply-To: <1267039367-8677-1-git-send-email-Martin.Jansa@gmail.com>

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



  reply	other threads:[~2010-02-24 20:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2010-02-25  8:07 ` Koen Kooi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100224204326.GA9601@denix.org \
    --to=denis@denix.org \
    --cc=k.kooi@student.utwente.nl \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.