From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1.windriver.com ([147.11.146.13]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S7kEF-00060y-Bu for bitbake-devel@lists.openembedded.org; Wed, 14 Mar 2012 10:10:43 +0100 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail1.windriver.com (8.14.3/8.14.3) with ESMTP id q2E91vME011730 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 14 Mar 2012 02:01:57 -0700 (PDT) Received: from [128.224.162.241] (128.224.162.241) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.1.255.0; Wed, 14 Mar 2012 02:01:57 -0700 Message-ID: <4F605E85.7070904@windriver.com> Date: Wed, 14 Mar 2012 17:01:57 +0800 From: Kang Kai User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: X-Originating-IP: [128.224.162.241] Cc: Richard Purdie Subject: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 09:10:43 -0000 Content-Type: multipart/alternative; boundary="------------030604020608070404070009" --------------030604020608070404070009 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Hi All, I write a script to clean up WORKDIR that remove the obsoleted packages' build directories. The script accept a argument as BUILDDIR and I use this clause to identify the WORKDIR: workdir = os.path.join(builddir, 'tmp/work') Then validate the workdir exists or not. It works for me but hardcode here as Richard point out. So is there a better way to get the WORKDIR here? Thanks. Regards, Kai --------------030604020608070404070009 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Hi All,

I write a script to clean up WORKDIR that remove the obsoleted packages' build directories.
The script accept a argument as BUILDDIR and I use this clause to identify the WORKDIR:

     workdir = os.path.join(builddir, 'tmp/work')

Then validate the workdir exists or not. It works for me but
hardcode here as Richard point out.
So is there  a better way to get the WORKDIR here? Thanks.

Regards,
Kai

--------------030604020608070404070009-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 93-97-173-237.zone5.bethere.co.uk ([93.97.173.237] helo=tim.rpsys.net) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S7ks2-0008Tw-Lf for bitbake-devel@lists.openembedded.org; Wed, 14 Mar 2012 10:51:50 +0100 Received: from localhost (localhost [127.0.0.1]) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q2E9h5cv006163; Wed, 14 Mar 2012 09:43:05 GMT Received: from tim.rpsys.net ([127.0.0.1]) by localhost (tim.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02825-09; Wed, 14 Mar 2012 09:43:01 +0000 (GMT) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q2E9gvWC006157 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Mar 2012 09:42:58 GMT Message-ID: <1331718176.18586.15.camel@ted> From: Richard Purdie To: Kang Kai Date: Wed, 14 Mar 2012 09:42:56 +0000 In-Reply-To: <4F605E85.7070904@windriver.com> References: <4F605E85.7070904@windriver.com> X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 X-Virus-Scanned: amavisd-new at rpsys.net Cc: bitbake-devel@lists.openembedded.org Subject: Re: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 09:51:50 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote: > Hi All, > > I write a script to clean up WORKDIR that remove the obsoleted > packages' build directories. > The script accept a argument as BUILDDIR and I use this clause to > identify the WORKDIR: > > workdir = os.path.join(builddir, 'tmp/work') > > Then validate the workdir exists or not. It works for me but hardcode > here as Richard point out. > So is there a better way to get the WORKDIR here? Thanks. I was thinking of something like: bitbake -e | grep ^WORKDIR since you already call into bitbake in the script in question. Cheers, Richard From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.windriver.com ([147.11.1.11]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S84je-00042g-M6 for bitbake-devel@lists.openembedded.org; Thu, 15 Mar 2012 08:04:31 +0100 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id q2F6teTX003585 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 14 Mar 2012 23:55:41 -0700 (PDT) Received: from [128.224.162.241] (128.224.162.241) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.1.255.0; Wed, 14 Mar 2012 23:55:41 -0700 Message-ID: <4F61926D.1060709@windriver.com> Date: Thu, 15 Mar 2012 14:55:41 +0800 From: Kang Kai User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Richard Purdie References: <4F605E85.7070904@windriver.com> <1331718176.18586.15.camel@ted> In-Reply-To: <1331718176.18586.15.camel@ted> X-Originating-IP: [128.224.162.241] X-MIME-Autoconverted: from 8bit to quoted-printable by mail.windriver.com id q2F6teTX003585 Cc: bitbake-devel@lists.openembedded.org Subject: Re: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 07:04:31 -0000 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable On 2012=E5=B9=B403=E6=9C=8814=E6=97=A5 17:42, Richard Purdie wrote: > On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote: >> Hi All, >> >> I write a script to clean up WORKDIR that remove the obsoleted >> packages' build directories. >> The script accept a argument as BUILDDIR and I use this clause to >> identify the WORKDIR: >> >> workdir =3D os.path.join(builddir, 'tmp/work') >> >> Then validate the workdir exists or not. It works for me but hardcode >> here as Richard point out. >> So is there a better way to get the WORKDIR here? Thanks. > I was thinking of something like: > > bitbake -e | grep ^WORKDIR If get WORKDIR in this way, I'll update the script with no argument=20 because the argument is useless to identify the WORKDIR. Regards, Kai > > since you already call into bitbake in the script in question. > > Cheers, > > Richard > > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1.windriver.com ([147.11.146.13]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S85Qb-0004i6-HY for bitbake-devel@lists.openembedded.org; Thu, 15 Mar 2012 08:48:53 +0100 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail1.windriver.com (8.14.3/8.14.3) with ESMTP id q2F7e4HA013336 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 15 Mar 2012 00:40:04 -0700 (PDT) Received: from [128.224.162.241] (128.224.162.241) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.1.255.0; Thu, 15 Mar 2012 00:40:04 -0700 Message-ID: <4F619CD4.4090103@windriver.com> Date: Thu, 15 Mar 2012 15:40:04 +0800 From: Kang Kai User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Richard Purdie References: <4F605E85.7070904@windriver.com> <1331718176.18586.15.camel@ted> <4F61926D.1060709@windriver.com> In-Reply-To: <4F61926D.1060709@windriver.com> X-Originating-IP: [128.224.162.241] X-MIME-Autoconverted: from 8bit to quoted-printable by mail1.windriver.com id q2F7e4HA013336 Cc: bitbake-devel@lists.openembedded.org Subject: Re: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 07:48:54 -0000 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable On 2012=E5=B9=B403=E6=9C=8815=E6=97=A5 14:55, Kang Kai wrote: > On 2012=E5=B9=B403=E6=9C=8814=E6=97=A5 17:42, Richard Purdie wrote: >> On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote: >>> Hi All, >>> >>> I write a script to clean up WORKDIR that remove the obsoleted >>> packages' build directories. >>> The script accept a argument as BUILDDIR and I use this clause to >>> identify the WORKDIR: >>> >>> workdir =3D os.path.join(builddir, 'tmp/work') >>> >>> Then validate the workdir exists or not. It works for me but hardcode >>> here as Richard point out. >>> So is there a better way to get the WORKDIR here? Thanks. >> I was thinking of something like: >> >> bitbake -e | grep ^WORKDIR And the result is something like that: WORKDIR=3D"/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/x86_64-= poky-linux/bblayers-1.0-r0" Is it ok to remove 2 items seperated by slash at the end of string?=20 Right now is: "/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/" Regards, Kai > > If get WORKDIR in this way, I'll update the script with no argument=20 > because the argument is useless to identify the WORKDIR. > > Regards, > Kai >> >> since you already call into bitbake in the script in question. >> >> Cheers, >> >> Richard >> >> > > > _______________________________________________ > bitbake-devel mailing list > bitbake-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wi0-f177.google.com ([209.85.212.177]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S85mx-0005Nv-3m for bitbake-devel@lists.openembedded.org; Thu, 15 Mar 2012 09:11:59 +0100 Received: by wibhj13 with SMTP id hj13so3359167wib.6 for ; Thu, 15 Mar 2012 01:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=tbtiMYeMNNCODy4Fyvv16pm9Rs0hIlR0M6rNQ/zZ1tk=; b=e45LsPIGx6/ozHCqHZsO1R7b2291fU90v6MSDbAayhOHQuqKoPegjHzmYYjHxJ8KWa SyeX+E3EnVb9CdKLNetUeH41HVpKQpvpx+oyv0A5WAiA3gSHC53N7kLjLdZpnz/WV/TT wtY+DSYSvMjWkkERhw8Jt1IPByR+McycGQzKaidYK0gNOgl/mI2+6zA5e5+Y6mlqgHLU hMlFZksVWPLXtl97Cym8YiACi1w73u5WGJk6gN0LHDhW1eoW1NaisUcmwUUCjLeHcwDH M0QRg5OR27X/KGsajlwmFtQcmIZYT9kG9jyNuVsq5hCO7QP7jzWhdxYDyVs3ICsYRmm+ tumA== Received: by 10.180.79.231 with SMTP id m7mr13237661wix.11.1331798593066; Thu, 15 Mar 2012 01:03:13 -0700 (PDT) Received: from localhost ([94.230.152.246]) by mx.google.com with ESMTPS id ff9sm3200335wib.2.2012.03.15.01.03.11 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Mar 2012 01:03:12 -0700 (PDT) Date: Thu, 15 Mar 2012 09:03:10 +0100 From: Martin Jansa To: Kang Kai Message-ID: <20120315080310.GC4973@jama.jama.net> References: <4F605E85.7070904@windriver.com> <1331718176.18586.15.camel@ted> <4F61926D.1060709@windriver.com> <4F619CD4.4090103@windriver.com> MIME-Version: 1.0 In-Reply-To: <4F619CD4.4090103@windriver.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: bitbake-devel@lists.openembedded.org Subject: Re: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 08:11:59 -0000 X-Groupsio-MsgNum: 1278 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Izn7cH1Com+I3R9J" Content-Disposition: inline --Izn7cH1Com+I3R9J Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 15, 2012 at 03:40:04PM +0800, Kang Kai wrote: > On 2012=E5=B9=B403=E6=9C=8815=E6=97=A5 14:55, Kang Kai wrote: > > On 2012=E5=B9=B403=E6=9C=8814=E6=97=A5 17:42, Richard Purdie wrote: > >> On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote: > >>> Hi All, > >>> > >>> I write a script to clean up WORKDIR that remove the obsoleted > >>> packages' build directories. > >>> The script accept a argument as BUILDDIR and I use this clause to > >>> identify the WORKDIR: > >>> > >>> workdir =3D os.path.join(builddir, 'tmp/work') > >>> > >>> Then validate the workdir exists or not. It works for me but hardcode > >>> here as Richard point out. > >>> So is there a better way to get the WORKDIR here? Thanks. > >> I was thinking of something like: > >> > >> bitbake -e | grep ^WORKDIR > And the result is something like that: > WORKDIR=3D"/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/x86_64-= poky-linux/bblayers-1.0-r0" >=20 > Is it ok to remove 2 items seperated by slash at the end of string?=20 > Right now is: > "/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/" Aren't you looking for ^TMPDIR ? >=20 > Regards, > Kai >=20 > > > > If get WORKDIR in this way, I'll update the script with no argument=20 > > because the argument is useless to identify the WORKDIR. > > > > Regards, > > Kai > >> > >> since you already call into bitbake in the script in question. > >> > >> Cheers, > >> > >> Richard > >> > >> > > > > > > _______________________________________________ > > bitbake-devel mailing list > > bitbake-devel@lists.openembedded.org > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel >=20 >=20 > _______________________________________________ > bitbake-devel mailing list > bitbake-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel --=20 Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com --Izn7cH1Com+I3R9J Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk9hoj4ACgkQN1Ujt2V2gBwSjwCgrv3GCxeSau6Qg7jDcqdVLbLl fV0An1Bwfuv5EW2ba7VxW5YnJ6G8gDaF =rKvW -----END PGP SIGNATURE----- --Izn7cH1Com+I3R9J-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.windriver.com ([147.11.1.11]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S86pJ-0007AG-Pq for bitbake-devel@lists.openembedded.org; Thu, 15 Mar 2012 10:18:30 +0100 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id q2F99aAH019327 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 15 Mar 2012 02:09:36 -0700 (PDT) Received: from [128.224.162.241] (128.224.162.241) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.1.255.0; Thu, 15 Mar 2012 02:09:36 -0700 Message-ID: <4F61B1D0.2080306@windriver.com> Date: Thu, 15 Mar 2012 17:09:36 +0800 From: Kang Kai User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Martin Jansa References: <4F605E85.7070904@windriver.com> <1331718176.18586.15.camel@ted> <4F61926D.1060709@windriver.com> <4F619CD4.4090103@windriver.com> <20120315080310.GC4973@jama.jama.net> In-Reply-To: <20120315080310.GC4973@jama.jama.net> X-Originating-IP: [128.224.162.241] X-MIME-Autoconverted: from 8bit to quoted-printable by mail.windriver.com id q2F99aAH019327 Cc: bitbake-devel@lists.openembedded.org Subject: Re: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 09:18:30 -0000 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable On 2012=E5=B9=B403=E6=9C=8815=E6=97=A5 16:03, Martin Jansa wrote: > On Thu, Mar 15, 2012 at 03:40:04PM +0800, Kang Kai wrote: >> On 2012=E5=B9=B403=E6=9C=8815=E6=97=A5 14:55, Kang Kai wrote: >>> On 2012=E5=B9=B403=E6=9C=8814=E6=97=A5 17:42, Richard Purdie wrote: >>>> On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote: >>>>> Hi All, >>>>> >>>>> I write a script to clean up WORKDIR that remove the obsoleted >>>>> packages' build directories. >>>>> The script accept a argument as BUILDDIR and I use this clause to >>>>> identify the WORKDIR: >>>>> >>>>> workdir =3D os.path.join(builddir, 'tmp/work') >>>>> >>>>> Then validate the workdir exists or not. It works for me but hardco= de >>>>> here as Richard point out. >>>>> So is there a better way to get the WORKDIR here? Thanks. >>>> I was thinking of something like: >>>> >>>> bitbake -e | grep ^WORKDIR >> And the result is something like that: >> WORKDIR=3D"/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/x86_= 64-poky-linux/bblayers-1.0-r0" >> >> Is it ok to remove 2 items seperated by slash at the end of string? >> Right now is: >> "/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/" > Aren't you looking for ^TMPDIR ? If use WORKDIR =3D TMPDIR/"work", it is still hard coding. >> Regards, >> Kai >> >>> If get WORKDIR in this way, I'll update the script with no argument >>> because the argument is useless to identify the WORKDIR. >>> >>> Regards, >>> Kai >>>> since you already call into bitbake in the script in question. >>>> >>>> Cheers, >>>> >>>> Richard >>>> >>>> >>> >>> _______________________________________________ >>> bitbake-devel mailing list >>> bitbake-devel@lists.openembedded.org >>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel >> >> _______________________________________________ >> bitbake-devel mailing list >> bitbake-devel@lists.openembedded.org >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wi0-f171.google.com ([209.85.212.171]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S870d-0007MO-ID for bitbake-devel@lists.openembedded.org; Thu, 15 Mar 2012 10:30:11 +0100 Received: by wibhj13 with SMTP id hj13so7371346wib.6 for ; Thu, 15 Mar 2012 02:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=l+j0Hk5H1ByrEOyRVbxJTU1+LBe95ywXniO8ZiULi+4=; b=HV33a1Df9AhRAX8oO4b9sjSJnEzYO4aVduqMDjr4zJpD3LTAcOn4DxqpB2fcKKMDUO GdHhPRvaUcwXFPS/e/wnmtF7PxK/QRu8OhMT37w8ZVGRXdrBqB99dS6DgdoOfH6Ouotb cQBFhmgn0ob1T2GGMNqpWA7b4WFKjE3EGwiuIXget2AgZe+B6/m3akpC6DwDZD5pFjy0 wdIXGpaywtGYfElJA0scySNnbjd5D1YGZcMuDVqMr31yieqRPTRjROCBQHyXHapFoo5X FS+aOyp1PFD/nSSAvKR5iylzMVdSnzI+BAdaBaPyhr+hH2HIoPYP1m+eQHj8hltWMZoV lXlg== Received: by 10.216.139.229 with SMTP id c79mr4223157wej.16.1331803285387; Thu, 15 Mar 2012 02:21:25 -0700 (PDT) Received: from localhost ([94.230.152.246]) by mx.google.com with ESMTPS id t20sm6125536wiv.0.2012.03.15.02.21.23 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Mar 2012 02:21:24 -0700 (PDT) Date: Thu, 15 Mar 2012 10:21:22 +0100 From: Martin Jansa To: Kang Kai Message-ID: <20120315092122.GE4973@jama.jama.net> References: <4F605E85.7070904@windriver.com> <1331718176.18586.15.camel@ted> <4F61926D.1060709@windriver.com> <4F619CD4.4090103@windriver.com> <20120315080310.GC4973@jama.jama.net> <4F61B1D0.2080306@windriver.com> MIME-Version: 1.0 In-Reply-To: <4F61B1D0.2080306@windriver.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: bitbake-devel@lists.openembedded.org Subject: Re: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 09:30:11 -0000 X-Groupsio-MsgNum: 1294 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WBsA/oQW3eTA3LlM" Content-Disposition: inline --WBsA/oQW3eTA3LlM Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 15, 2012 at 05:09:36PM +0800, Kang Kai wrote: > On 2012=E5=B9=B403=E6=9C=8815=E6=97=A5 16:03, Martin Jansa wrote: > > On Thu, Mar 15, 2012 at 03:40:04PM +0800, Kang Kai wrote: > >> On 2012=E5=B9=B403=E6=9C=8815=E6=97=A5 14:55, Kang Kai wrote: > >>> On 2012=E5=B9=B403=E6=9C=8814=E6=97=A5 17:42, Richard Purdie wrote: > >>>> On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote: > >>>>> Hi All, > >>>>> > >>>>> I write a script to clean up WORKDIR that remove the obsoleted > >>>>> packages' build directories. > >>>>> The script accept a argument as BUILDDIR and I use this clause to > >>>>> identify the WORKDIR: > >>>>> > >>>>> workdir =3D os.path.join(builddir, 'tmp/work') > >>>>> > >>>>> Then validate the workdir exists or not. It works for me but hardco= de > >>>>> here as Richard point out. > >>>>> So is there a better way to get the WORKDIR here? Thanks. > >>>> I was thinking of something like: > >>>> > >>>> bitbake -e | grep ^WORKDIR > >> And the result is something like that: > >> WORKDIR=3D"/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/x86_= 64-poky-linux/bblayers-1.0-r0" > >> > >> Is it ok to remove 2 items seperated by slash at the end of string? > >> Right now is: > >> "/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/" > > Aren't you looking for ^TMPDIR ? >=20 > If use WORKDIR =3D TMPDIR/"work", it is still hard coding. Assuming 2 items at the end won't work for people using rm_old_work: http://git.openembedded.org/meta-micro/commit/?id=3Dfcf525654915edb9650f1a6= c2852f336366f8b2f or slightly different version: http://git.shr-project.org/git/?p=3Dmeta-smartphone.git;a=3Dblob;f=3Dmeta-s= hr/classes/rm_old_work.bbclass And I think more people have different "tmp/" part e.g. default would be "tmp-eglibc/" (thanks to TCLIBCAPPEND meta/conf/distro/defaultsetup.conf:TMPDIR .=3D "${TCLIBCAPPEND}"), but "wor= k" is=20 quite common. meta/conf/bitbake.conf: WORKDIR =3D "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}" meta-shr/classes/rm_old_work.bbclass: WORKDIR =3D "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${PF}" meta-micro/classes/rm_old_work.bbclass: WORKDIR =3D "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-= ${PR}" Cheers, >=20 > >> Regards, > >> Kai > >> > >>> If get WORKDIR in this way, I'll update the script with no argument > >>> because the argument is useless to identify the WORKDIR. > >>> > >>> Regards, > >>> Kai > >>>> since you already call into bitbake in the script in question. > >>>> > >>>> Cheers, > >>>> > >>>> Richard > >>>> > >>>> > >>> > >>> _______________________________________________ > >>> bitbake-devel mailing list > >>> bitbake-devel@lists.openembedded.org > >>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > >> > >> _______________________________________________ > >> bitbake-devel mailing list > >> bitbake-devel@lists.openembedded.org > >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel >=20 --=20 Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com --WBsA/oQW3eTA3LlM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk9htJIACgkQN1Ujt2V2gByt8ACgpFjLGIwws6rDo6a1Os+/hPGE zzQAni9BbROCXN515TeOO0MlClQCsdaR =53Ce -----END PGP SIGNATURE----- --WBsA/oQW3eTA3LlM-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1.windriver.com ([147.11.146.13]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S87DE-0007U9-LN for bitbake-devel@lists.openembedded.org; Thu, 15 Mar 2012 10:43:13 +0100 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail1.windriver.com (8.14.3/8.14.3) with ESMTP id q2F9YLw5014379 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 15 Mar 2012 02:34:21 -0700 (PDT) Received: from [128.224.162.241] (128.224.162.241) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.1.255.0; Thu, 15 Mar 2012 02:34:21 -0700 Message-ID: <4F61B79D.8000405@windriver.com> Date: Thu, 15 Mar 2012 17:34:21 +0800 From: Kang Kai User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Martin Jansa References: <4F605E85.7070904@windriver.com> <1331718176.18586.15.camel@ted> <4F61926D.1060709@windriver.com> <4F619CD4.4090103@windriver.com> <20120315080310.GC4973@jama.jama.net> <4F61B1D0.2080306@windriver.com> <20120315092122.GE4973@jama.jama.net> In-Reply-To: <20120315092122.GE4973@jama.jama.net> X-Originating-IP: [128.224.162.241] X-MIME-Autoconverted: from 8bit to quoted-printable by mail1.windriver.com id q2F9YLw5014379 Cc: bitbake-devel@lists.openembedded.org Subject: Re: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 09:43:13 -0000 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable On 2012=E5=B9=B403=E6=9C=8815=E6=97=A5 17:21, Martin Jansa wrote: > On Thu, Mar 15, 2012 at 05:09:36PM +0800, Kang Kai wrote: >> On 2012=E5=B9=B403=E6=9C=8815=E6=97=A5 16:03, Martin Jansa wrote: >>> On Thu, Mar 15, 2012 at 03:40:04PM +0800, Kang Kai wrote: >>>> On 2012=E5=B9=B403=E6=9C=8815=E6=97=A5 14:55, Kang Kai wrote: >>>>> On 2012=E5=B9=B403=E6=9C=8814=E6=97=A5 17:42, Richard Purdie wrote: >>>>>> On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote: >>>>>>> Hi All, >>>>>>> >>>>>>> I write a script to clean up WORKDIR that remove the obsoleted >>>>>>> packages' build directories. >>>>>>> The script accept a argument as BUILDDIR and I use this clause to >>>>>>> identify the WORKDIR: >>>>>>> >>>>>>> workdir =3D os.path.join(builddir, 'tmp/work') >>>>>>> >>>>>>> Then validate the workdir exists or not. It works for me but hard= code >>>>>>> here as Richard point out. >>>>>>> So is there a better way to get the WORKDIR here? Thanks. >>>>>> I was thinking of something like: >>>>>> >>>>>> bitbake -e | grep ^WORKDIR >>>> And the result is something like that: >>>> WORKDIR=3D"/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/x8= 6_64-poky-linux/bblayers-1.0-r0" >>>> >>>> Is it ok to remove 2 items seperated by slash at the end of string? >>>> Right now is: >>>> "/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/" >>> Aren't you looking for ^TMPDIR ? >> If use WORKDIR =3D TMPDIR/"work", it is still hard coding. > Assuming 2 items at the end won't work for people using rm_old_work: > http://git.openembedded.org/meta-micro/commit/?id=3Dfcf525654915edb9650= f1a6c2852f336366f8b2f > or slightly different version: > http://git.shr-project.org/git/?p=3Dmeta-smartphone.git;a=3Dblob;f=3Dme= ta-shr/classes/rm_old_work.bbclass Hi Martin, > And I think more people have different "tmp/" part e.g. default would b= e > "tmp-eglibc/" (thanks to TCLIBCAPPEND > meta/conf/distro/defaultsetup.conf:TMPDIR .=3D "${TCLIBCAPPEND}"), but = "work" is > quite common. > > meta/conf/bitbake.conf: > WORKDIR =3D "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}" > meta-shr/classes/rm_old_work.bbclass: > WORKDIR =3D "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${PF}" > meta-micro/classes/rm_old_work.bbclass: > WORKDIR =3D "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${= PV}-${PR}" OK. Thanks very much. Regards, Kai > Cheers, > >>>> Regards, >>>> Kai >>>> >>>>> If get WORKDIR in this way, I'll update the script with no argument >>>>> because the argument is useless to identify the WORKDIR. >>>>> >>>>> Regards, >>>>> Kai >>>>>> since you already call into bitbake in the script in question. >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Richard >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> bitbake-devel mailing list >>>>> bitbake-devel@lists.openembedded.org >>>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel >>>> _______________________________________________ >>>> bitbake-devel mailing list >>>> bitbake-devel@lists.openembedded.org >>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vms173003pub.verizon.net ([206.46.173.3]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S8GLB-0003Uk-S7 for bitbake-devel@lists.openembedded.org; Thu, 15 Mar 2012 20:28:02 +0100 Received: from gandalf.denix.org ([unknown] [71.178.225.66]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0M0X005YVUV9YCF1@vms173003.mailsrvcs.net> for bitbake-devel@lists.openembedded.org; Thu, 15 Mar 2012 13:18:46 -0500 (CDT) Received: by gandalf.denix.org (Postfix, from userid 1000) id 2549A201AC; Thu, 15 Mar 2012 14:18:44 -0400 (EDT) Date: Thu, 15 Mar 2012 14:18:44 -0400 From: Denys Dmytriyenko To: Martin Jansa Message-id: <20120315181844.GE30363@denix.org> References: <4F605E85.7070904@windriver.com> <1331718176.18586.15.camel@ted> <4F61926D.1060709@windriver.com> <4F619CD4.4090103@windriver.com> <20120315080310.GC4973@jama.jama.net> <4F61B1D0.2080306@windriver.com> <20120315092122.GE4973@jama.jama.net> MIME-version: 1.0 In-reply-to: <20120315092122.GE4973@jama.jama.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Kang Kai , bitbake-devel@lists.openembedded.org Subject: Re: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 19:28:02 -0000 Content-type: text/plain; charset=us-ascii Content-disposition: inline On Thu, Mar 15, 2012 at 10:21:22AM +0100, Martin Jansa wrote: > On Thu, Mar 15, 2012 at 05:09:36PM +0800, Kang Kai wrote: > > On 2012???03???15??? 16:03, Martin Jansa wrote: > > > On Thu, Mar 15, 2012 at 03:40:04PM +0800, Kang Kai wrote: > > >> On 2012???03???15??? 14:55, Kang Kai wrote: > > >>> On 2012???03???14??? 17:42, Richard Purdie wrote: > > >>>> On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote: > > >>>>> Hi All, > > >>>>> > > >>>>> I write a script to clean up WORKDIR that remove the obsoleted > > >>>>> packages' build directories. > > >>>>> The script accept a argument as BUILDDIR and I use this clause to > > >>>>> identify the WORKDIR: > > >>>>> > > >>>>> workdir = os.path.join(builddir, 'tmp/work') > > >>>>> > > >>>>> Then validate the workdir exists or not. It works for me but hardcode > > >>>>> here as Richard point out. > > >>>>> So is there a better way to get the WORKDIR here? Thanks. > > >>>> I was thinking of something like: > > >>>> > > >>>> bitbake -e | grep ^WORKDIR > > >> And the result is something like that: > > >> WORKDIR="/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/x86_64-poky-linux/bblayers-1.0-r0" > > >> > > >> Is it ok to remove 2 items seperated by slash at the end of string? > > >> Right now is: > > >> "/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/" > > > Aren't you looking for ^TMPDIR ? > > > > If use WORKDIR = TMPDIR/"work", it is still hard coding. > > Assuming 2 items at the end won't work for people using rm_old_work: > http://git.openembedded.org/meta-micro/commit/?id=fcf525654915edb9650f1a6c2852f336366f8b2f > or slightly different version: > http://git.shr-project.org/git/?p=meta-smartphone.git;a=blob;f=meta-shr/classes/rm_old_work.bbclass Martin, Can you please point me to more details about this class - any background or discussions... Thanks. -- Denys > And I think more people have different "tmp/" part e.g. default would be > "tmp-eglibc/" (thanks to TCLIBCAPPEND > meta/conf/distro/defaultsetup.conf:TMPDIR .= "${TCLIBCAPPEND}"), but "work" is > quite common. > > meta/conf/bitbake.conf: > WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}" > meta-shr/classes/rm_old_work.bbclass: > WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${PF}" > meta-micro/classes/rm_old_work.bbclass: > WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" > > Cheers, > > > > > >> Regards, > > >> Kai > > >> > > >>> If get WORKDIR in this way, I'll update the script with no argument > > >>> because the argument is useless to identify the WORKDIR. > > >>> > > >>> Regards, > > >>> Kai > > >>>> since you already call into bitbake in the script in question. > > >>>> > > >>>> Cheers, > > >>>> > > >>>> Richard > > >>>> > > >>>> > > >>> > > >>> _______________________________________________ > > >>> bitbake-devel mailing list > > >>> bitbake-devel@lists.openembedded.org > > >>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > >> > > >> _______________________________________________ > > >> bitbake-devel mailing list > > >> bitbake-devel@lists.openembedded.org > > >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > > > -- > Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com > _______________________________________________ > bitbake-devel mailing list > bitbake-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wg0-f43.google.com ([74.125.82.43]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S8Qzq-0003tV-US for bitbake-devel@lists.openembedded.org; Fri, 16 Mar 2012 07:50:43 +0100 Received: by wgbdr12 with SMTP id dr12so119819wgb.24 for ; Thu, 15 Mar 2012 23:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=g3EhnC2xheyEpwZmAaCHjahnum/7irjr9lF2hjGZENw=; b=eMZS9o7+icCxnmExnd3mA7ab5SFUKXoW3nemYzC5eFBY+5tFOKC8B2W3FEbc2LAf5g A6glpaum7H1bljiZSUV8/ovvKbKEk8N+qZZMFhIC62hRTVZi1CA44x5r77vbiuP60tfb /3LQv9YWDNFtiCTOaAM7gA7r5YorktekQVjgbVE99V+pA9zStKMOTsR4VqXmlS9Fzqha EICmVW6yezOuDNkaBjvtzg//0BGRarmVeDIfoyum7RSxRqkmob73ROtY8Nb8p0Vm+UwR JHhZvi0u9a3QtuD2OH2njNlosl26txOG12huiIKM2oyViwWB5JGSbufv7UFeqzA6/zA1 dqUg== Received: by 10.180.87.8 with SMTP id t8mr32709122wiz.15.1331880115587; Thu, 15 Mar 2012 23:41:55 -0700 (PDT) Received: from localhost ([94.230.152.246]) by mx.google.com with ESMTPS id ez18sm1076332wid.4.2012.03.15.23.41.53 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Mar 2012 23:41:54 -0700 (PDT) Date: Fri, 16 Mar 2012 07:41:52 +0100 From: Martin Jansa To: Denys Dmytriyenko Message-ID: <20120316064152.GA3855@jama.jama.net> References: <4F605E85.7070904@windriver.com> <1331718176.18586.15.camel@ted> <4F61926D.1060709@windriver.com> <4F619CD4.4090103@windriver.com> <20120315080310.GC4973@jama.jama.net> <4F61B1D0.2080306@windriver.com> <20120315092122.GE4973@jama.jama.net> <20120315181844.GE30363@denix.org> MIME-Version: 1.0 In-Reply-To: <20120315181844.GE30363@denix.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Kang Kai , bitbake-devel@lists.openembedded.org Subject: Re: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 06:50:43 -0000 X-Groupsio-MsgNum: 1301 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 15, 2012 at 02:18:44PM -0400, Denys Dmytriyenko wrote: > On Thu, Mar 15, 2012 at 10:21:22AM +0100, Martin Jansa wrote: > > On Thu, Mar 15, 2012 at 05:09:36PM +0800, Kang Kai wrote: > > > On 2012???03???15??? 16:03, Martin Jansa wrote: > > > > On Thu, Mar 15, 2012 at 03:40:04PM +0800, Kang Kai wrote: > > > >> On 2012???03???15??? 14:55, Kang Kai wrote: > > > >>> On 2012???03???14??? 17:42, Richard Purdie wrote: > > > >>>> On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote: > > > >>>>> Hi All, > > > >>>>> > > > >>>>> I write a script to clean up WORKDIR that remove the obsoleted > > > >>>>> packages' build directories. > > > >>>>> The script accept a argument as BUILDDIR and I use this clause = to > > > >>>>> identify the WORKDIR: > > > >>>>> > > > >>>>> workdir =3D os.path.join(builddir, 'tmp/work') > > > >>>>> > > > >>>>> Then validate the workdir exists or not. It works for me but ha= rdcode > > > >>>>> here as Richard point out. > > > >>>>> So is there a better way to get the WORKDIR here? Thanks. > > > >>>> I was thinking of something like: > > > >>>> > > > >>>> bitbake -e | grep ^WORKDIR > > > >> And the result is something like that: > > > >> WORKDIR=3D"/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/= x86_64-poky-linux/bblayers-1.0-r0" > > > >> > > > >> Is it ok to remove 2 items seperated by slash at the end of string? > > > >> Right now is: > > > >> "/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/" > > > > Aren't you looking for ^TMPDIR ? > > >=20 > > > If use WORKDIR =3D TMPDIR/"work", it is still hard coding. > >=20 > > Assuming 2 items at the end won't work for people using rm_old_work: > > http://git.openembedded.org/meta-micro/commit/?id=3Dfcf525654915edb9650= f1a6c2852f336366f8b2f > > or slightly different version: > > http://git.shr-project.org/git/?p=3Dmeta-smartphone.git;a=3Dblob;f=3Dme= ta-shr/classes/rm_old_work.bbclass >=20 > Martin, >=20 > Can you please point me to more details about this class - any background= or=20 > discussions... Thanks. Hi, Well it works better then rm_work with sstate and the original class is =66rom meta-micro (so maybe ask pb if you want more details, but the class is quite simple). I've just replaced last directory name because of this issue: http://git.shr-project.org/git/?p=3Dmeta-smartphone.git;a=3Dcommit;h=3D0d4c= 17de1ba7343d82bb10c311754e29d573c485 Cheers, >=20 > --=20 > Denys >=20 >=20 > > And I think more people have different "tmp/" part e.g. default would be > > "tmp-eglibc/" (thanks to TCLIBCAPPEND > > meta/conf/distro/defaultsetup.conf:TMPDIR .=3D "${TCLIBCAPPEND}"), but = "work" is=20 > > quite common. > >=20 > > meta/conf/bitbake.conf: > > WORKDIR =3D "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}" > > meta-shr/classes/rm_old_work.bbclass: > > WORKDIR =3D "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${PF}" > > meta-micro/classes/rm_old_work.bbclass: > > WORKDIR =3D "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${= PV}-${PR}" > >=20 > > Cheers, > >=20 > > >=20 > > > >> Regards, > > > >> Kai > > > >> > > > >>> If get WORKDIR in this way, I'll update the script with no argume= nt > > > >>> because the argument is useless to identify the WORKDIR. > > > >>> > > > >>> Regards, > > > >>> Kai > > > >>>> since you already call into bitbake in the script in question. > > > >>>> > > > >>>> Cheers, > > > >>>> > > > >>>> Richard > > > >>>> > > > >>>> > > > >>> > > > >>> _______________________________________________ > > > >>> bitbake-devel mailing list > > > >>> bitbake-devel@lists.openembedded.org > > > >>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > > >> > > > >> _______________________________________________ > > > >> bitbake-devel mailing list > > > >> bitbake-devel@lists.openembedded.org > > > >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > >=20 > >=20 > > --=20 > > Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com >=20 >=20 >=20 > > _______________________________________________ > > bitbake-devel mailing list > > bitbake-devel@lists.openembedded.org > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel >=20 --=20 Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com --SLDf9lqlvOQaIe6s Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk9i4LAACgkQN1Ujt2V2gBxcQQCbB83XOInJhiNBlaRBrSk5esP8 frEAoJE+FBY5AakKBQ4d6x9B0/LaiHJB =jwcv -----END PGP SIGNATURE----- --SLDf9lqlvOQaIe6s-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vms173005pub.verizon.net ([206.46.173.5]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S9kKZ-0004DX-Nn for bitbake-devel@lists.openembedded.org; Mon, 19 Mar 2012 22:41:32 +0100 Received: from gandalf.denix.org ([unknown] [71.178.225.66]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0M15006XUFPQWGS1@vms173005.mailsrvcs.net> for bitbake-devel@lists.openembedded.org; Mon, 19 Mar 2012 15:32:15 -0500 (CDT) Received: by gandalf.denix.org (Postfix, from userid 1000) id DBB0C2018B; Mon, 19 Mar 2012 16:32:13 -0400 (EDT) Date: Mon, 19 Mar 2012 16:32:13 -0400 From: Denys Dmytriyenko To: Martin Jansa Message-id: <20120319203213.GC15554@denix.org> References: <4F605E85.7070904@windriver.com> <1331718176.18586.15.camel@ted> <4F61926D.1060709@windriver.com> <4F619CD4.4090103@windriver.com> <20120315080310.GC4973@jama.jama.net> <4F61B1D0.2080306@windriver.com> <20120315092122.GE4973@jama.jama.net> <20120315181844.GE30363@denix.org> <20120316064152.GA3855@jama.jama.net> MIME-version: 1.0 In-reply-to: <20120316064152.GA3855@jama.jama.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: philb@gnu.org, Kang Kai , bitbake-devel@lists.openembedded.org Subject: Re: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2012 21:41:32 -0000 Content-type: text/plain; charset=us-ascii Content-disposition: inline On Fri, Mar 16, 2012 at 07:41:52AM +0100, Martin Jansa wrote: > On Thu, Mar 15, 2012 at 02:18:44PM -0400, Denys Dmytriyenko wrote: > > On Thu, Mar 15, 2012 at 10:21:22AM +0100, Martin Jansa wrote: > > > On Thu, Mar 15, 2012 at 05:09:36PM +0800, Kang Kai wrote: > > > > On 2012???03???15??? 16:03, Martin Jansa wrote: > > > > > On Thu, Mar 15, 2012 at 03:40:04PM +0800, Kang Kai wrote: > > > > >> On 2012???03???15??? 14:55, Kang Kai wrote: > > > > >>> On 2012???03???14??? 17:42, Richard Purdie wrote: > > > > >>>> On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote: > > > > >>>>> Hi All, > > > > >>>>> > > > > >>>>> I write a script to clean up WORKDIR that remove the obsoleted > > > > >>>>> packages' build directories. > > > > >>>>> The script accept a argument as BUILDDIR and I use this clause to > > > > >>>>> identify the WORKDIR: > > > > >>>>> > > > > >>>>> workdir = os.path.join(builddir, 'tmp/work') > > > > >>>>> > > > > >>>>> Then validate the workdir exists or not. It works for me but hardcode > > > > >>>>> here as Richard point out. > > > > >>>>> So is there a better way to get the WORKDIR here? Thanks. > > > > >>>> I was thinking of something like: > > > > >>>> > > > > >>>> bitbake -e | grep ^WORKDIR > > > > >> And the result is something like that: > > > > >> WORKDIR="/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/x86_64-poky-linux/bblayers-1.0-r0" > > > > >> > > > > >> Is it ok to remove 2 items seperated by slash at the end of string? > > > > >> Right now is: > > > > >> "/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/" > > > > > Aren't you looking for ^TMPDIR ? > > > > > > > > If use WORKDIR = TMPDIR/"work", it is still hard coding. > > > > > > Assuming 2 items at the end won't work for people using rm_old_work: > > > http://git.openembedded.org/meta-micro/commit/?id=fcf525654915edb9650f1a6c2852f336366f8b2f > > > or slightly different version: > > > http://git.shr-project.org/git/?p=meta-smartphone.git;a=blob;f=meta-shr/classes/rm_old_work.bbclass > > > > Martin, > > > > Can you please point me to more details about this class - any background or > > discussions... Thanks. > > Hi, > > Well it works better then rm_work with sstate and the original class is > from meta-micro (so maybe ask pb if you want more details, but the class > is quite simple). I've just replaced last directory name because of this > issue: > > http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=0d4c17de1ba7343d82bb10c311754e29d573c485 Martin, Hmm, my understanding those are slightly different classes - rm_work cleans WORKDIR after the build to save space, while this rm_old_work seems to clean up before the build. I tried searching for any previous discussions of this class or any other rationale, but even the commit itself doesn't provide much explanation for it... Phil, Do you mind giving a short description of this peculiar rm_old_work class? :) Thanks. -- Denys > > > And I think more people have different "tmp/" part e.g. default would be > > > "tmp-eglibc/" (thanks to TCLIBCAPPEND > > > meta/conf/distro/defaultsetup.conf:TMPDIR .= "${TCLIBCAPPEND}"), but "work" is > > > quite common. > > > > > > meta/conf/bitbake.conf: > > > WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}" > > > meta-shr/classes/rm_old_work.bbclass: > > > WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${PF}" > > > meta-micro/classes/rm_old_work.bbclass: > > > WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" > > > > > > Cheers, > > > > > > > > > > > >> Regards, > > > > >> Kai > > > > >> > > > > >>> If get WORKDIR in this way, I'll update the script with no argument > > > > >>> because the argument is useless to identify the WORKDIR. > > > > >>> > > > > >>> Regards, > > > > >>> Kai > > > > >>>> since you already call into bitbake in the script in question. > > > > >>>> > > > > >>>> Cheers, > > > > >>>> > > > > >>>> Richard > > > > >>>> > > > > >>>> > > > > >>> > > > > >>> _______________________________________________ > > > > >>> bitbake-devel mailing list > > > > >>> bitbake-devel@lists.openembedded.org > > > > >>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > > > >> > > > > >> _______________________________________________ > > > > >> bitbake-devel mailing list > > > > >> bitbake-devel@lists.openembedded.org > > > > >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > > > > > > > > > -- > > > Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com > > > > > > > > > _______________________________________________ > > > bitbake-devel mailing list > > > bitbake-devel@lists.openembedded.org > > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > > > -- > Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ob0-f175.google.com ([209.85.214.175]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S9kPW-0004JN-QB for bitbake-devel@lists.openembedded.org; Mon, 19 Mar 2012 22:46:39 +0100 Received: by obqv19 with SMTP id v19so1562724obq.6 for ; Mon, 19 Mar 2012 14:37:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:message-id:in-reply-to:references:subject:x-mailer :mime-version:content-type; bh=mIO0K98h8diCABDOwdFBDVy7e+SKfEif29ciTsoxI9s=; b=CZdIhedsBaWURhGuixg/0iIQqyP68hgbxB/OrcOmIz4HcACYk2vo1d0Z/o5Q82a4+e ykAJ2X26+MkS15jLOwYUvw1njTIyA9cvngfFhR7EOnak5vms4QH5Ld9mvdahe09lwdtY q6Kb24J49WqfvxDIcD5MfLpUfJXlw9JXhOSYosudAEF2Ol2G2x7dT2yVt6AQ3AxxAr3H nA/Q1N7hA4gjp/8FhkWnEpfJmkpztSdQ+eWeN7RQj7r8nhKRECBgjgmloGf9agg7G04q 30LPE7PUd1Ia842N5EtrsZtG8SfDC+ksbaS17OUVwtY4KpQMQj3Gi1IAi3m+lW1sGtgi iuwQ== Received: by 10.182.12.37 with SMTP id v5mr15331468obb.16.1332193066613; Mon, 19 Mar 2012 14:37:46 -0700 (PDT) Received: from frey.local (ip68-110-79-242.ph.ph.cox.net. [68.110.79.242]) by mx.google.com with ESMTPS id c2sm10976228oeb.13.2012.03.19.14.37.44 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Mar 2012 14:37:45 -0700 (PDT) Date: Mon, 19 Mar 2012 14:37:42 -0700 From: Christopher Larson To: Denys Dmytriyenko Message-ID: <9DB46E3A8C854D2595CB6F683FB6D1D0@gmail.com> In-Reply-To: <20120319203213.GC15554@denix.org> References: <4F605E85.7070904@windriver.com> <1331718176.18586.15.camel@ted> <4F61926D.1060709@windriver.com> <4F619CD4.4090103@windriver.com> <20120315080310.GC4973@jama.jama.net> <4F61B1D0.2080306@windriver.com> <20120315092122.GE4973@jama.jama.net> <20120315181844.GE30363@denix.org> <20120316064152.GA3855@jama.jama.net> <20120319203213.GC15554@denix.org> X-Mailer: sparrow 1.5 (build 1043.1) MIME-Version: 1.0 Cc: philb@gnu.org, Kang Kai , bitbake-devel@lists.openembedded.org, Martin Jansa Subject: Re: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2012 21:46:39 -0000 Content-Type: multipart/alternative; boundary="4f67a726_515f007c_aa0" --4f67a726_515f007c_aa0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline rm_old_work seems to do exactly what it sounds like. It removes *old* workdirs from previous versions of the recipe to keep it from bloating without bound if you retain the same tmpdir. -- Christopher Larson On Monday, March 19, 2012 at 1:32 PM, Denys Dmytriyenko wrote: > On Fri, Mar 16, 2012 at 07:41:52AM +0100, Martin Jansa wrote: > > On Thu, Mar 15, 2012 at 02:18:44PM -0400, Denys Dmytriyenko wrote: > > > On Thu, Mar 15, 2012 at 10:21:22AM +0100, Martin Jansa wrote: > > > > On Thu, Mar 15, 2012 at 05:09:36PM +0800, Kang Kai wrote: > > > > > On 2012???03???15??? 16:03, Martin Jansa wrote: > > > > > > On Thu, Mar 15, 2012 at 03:40:04PM +0800, Kang Kai wrote: > > > > > > > On 2012???03???15??? 14:55, Kang Kai wrote: > > > > > > > > On 2012???03???14??? 17:42, Richard Purdie wrote: > > > > > > > > > On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote: > > > > > > > > > > Hi All, > > > > > > > > > > > > > > > > > > > > I write a script to clean up WORKDIR that remove the obsoleted > > > > > > > > > > packages' build directories. > > > > > > > > > > The script accept a argument as BUILDDIR and I use this clause to > > > > > > > > > > identify the WORKDIR: > > > > > > > > > > > > > > > > > > > > workdir = os.path.join(builddir, 'tmp/work') > > > > > > > > > > > > > > > > > > > > Then validate the workdir exists or not. It works for me but hardcode > > > > > > > > > > here as Richard point out. > > > > > > > > > > So is there a better way to get the WORKDIR here? Thanks. > > > > > > > > > > > > > > > > > > > > > > > > > > > > I was thinking of something like: > > > > > > > > > > > > > > > > > > bitbake -e | grep ^WORKDIR > > > > > > > And the result is something like that: > > > > > > > WORKDIR="/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/x86_64-poky-linux/bblayers-1.0-r0" > > > > > > > > > > > > > > Is it ok to remove 2 items seperated by slash at the end of string? > > > > > > > Right now is: > > > > > > > "/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/" > > > > > > > > > > > > > > > > > > > Aren't you looking for ^TMPDIR ? > > > > > > > > > > > > > > > > > > > > > If use WORKDIR = TMPDIR/"work", it is still hard coding. > > > > > > > > Assuming 2 items at the end won't work for people using rm_old_work: > > > > http://git.openembedded.org/meta-micro/commit/?id=fcf525654915edb9650f1a6c2852f336366f8b2f > > > > or slightly different version: > > > > http://git.shr-project.org/git/?p=meta-smartphone.git;a=blob;f=meta-shr/classes/rm_old_work.bbclass > > > > > > > > > > > > > Martin, > > > > > > Can you please point me to more details about this class - any background or > > > discussions... Thanks. > > > > > > > > > Hi, > > > > Well it works better then rm_work with sstate and the original class is > > from meta-micro (so maybe ask pb if you want more details, but the class > > is quite simple). I've just replaced last directory name because of this > > issue: > > > > http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=0d4c17de1ba7343d82bb10c311754e29d573c485 > > Martin, > > Hmm, my understanding those are slightly different classes - rm_work cleans > WORKDIR after the build to save space, while this rm_old_work seems to clean > up before the build. I tried searching for any previous discussions of this > class or any other rationale, but even the commit itself doesn't provide much > explanation for it... > > Phil, > > Do you mind giving a short description of this peculiar rm_old_work class? :) > Thanks. > > -- > Denys > > > > > > And I think more people have different "tmp/" part e.g. default would be > > > > "tmp-eglibc/" (thanks to TCLIBCAPPEND > > > > meta/conf/distro/defaultsetup.conf:TMPDIR .= "${TCLIBCAPPEND}"), but "work" is > > > > quite common. > > > > > > > > meta/conf/bitbake.conf: > > > > WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}" > > > > meta-shr/classes/rm_old_work.bbclass: > > > > WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${PF}" > > > > meta-micro/classes/rm_old_work.bbclass: > > > > WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" > > > > > > > > Cheers, > > > > > > > > > > > > > > > > Regards, > > > > > > > Kai > > > > > > > > > > > > > > > If get WORKDIR in this way, I'll update the script with no argument > > > > > > > > because the argument is useless to identify the WORKDIR. > > > > > > > > > > > > > > > > Regards, > > > > > > > > Kai > > > > > > > > > since you already call into bitbake in the script in question. > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > > > > > > > > > > Richard > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > bitbake-devel mailing list > > > > > > > > bitbake-devel@lists.openembedded.org (mailto:bitbake-devel@lists.openembedded.org) > > > > > > > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > bitbake-devel mailing list > > > > > > > bitbake-devel@lists.openembedded.org (mailto:bitbake-devel@lists.openembedded.org) > > > > > > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com (mailto:Martin.Jansa@gmail.com) > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > bitbake-devel mailing list > > > > bitbake-devel@lists.openembedded.org (mailto:bitbake-devel@lists.openembedded.org) > > > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > > > > > > > > > > > > > > > -- > > Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com (mailto:Martin.Jansa@gmail.com) > > > > > > > _______________________________________________ > bitbake-devel mailing list > bitbake-devel@lists.openembedded.org (mailto:bitbake-devel@lists.openembedded.org) > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > --4f67a726_515f007c_aa0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
rm=5Fold=5Fwork seems to do exactly what it sounds like. It removes *= old* workdirs from previous versions of the recipe to keep it from bloati= ng without bound if you retain the same tmpdir.

-- 
Christopher L= arson

=20

On Monday, March 19, 2= 012 at 1:32 PM, Denys Dmytriyenko wrote:

On =46ri, Mar 16, 2012 at 07:41:= 52AM +0100, Martin Jansa wrote:
<= div>On Thu, Mar 15, 2012 at 02:18:44PM -0400, Denys Dmytriyenko wrote:
On Thu, Mar 15, 2012 at 10:21:= 22AM +0100, Martin Jansa wrote:
<= div>On Thu, Mar 15, 2012 at 05:09:36PM +0800, Kang Kai wrote:
On 2012=3F=3F=3F03=3F=3F=3F15=3F=3F=3F = 16:03, Martin Jansa wrote:
O= n Thu, Mar 15, 2012 at 03:40:04PM +0800, Kang Kai wrote:
On 2012=3F=3F=3F03=3F=3F=3F15=3F=3F=3F 14:55= , Kang Kai wrote:
On 2012=3F= =3F=3F03=3F=3F=3F14=3F=3F=3F 17:42, Richard Purdie wrote:
On Wed, 2012-03-14 at 17:01 +0800, Kang Kai= wrote:
Hi All,
I write a script to clean up WORKDIR that remove the obsolet= ed
packages' build directories.
The script accept a a= rgument as BUILDDIR and I use this clause to
identify the WORKD= IR:

workdir =3D os.path.join(builddir, 't= mp/work')

Then validate the workdir exists or no= t. It works for me but hardcode
here as Richard point out.
So is there a better way to get the WORKDIR here=3F Thanks.
<= /div>
I was thinking of something like:

bitbake -e =7C grep =5EWORKDIR
And the result is something like that:
WORKDIR=3D= =22/mnt/sda10/poky-all-platform/build-qemux86=5F64/tmp/work/x86=5F64-poky= -linux/bblayers-1.0-r0=22

Is it ok to remove 2 i= tems seperated by slash at the end of string=3F
Right now is:
=22/mnt/sda10/poky-all-platform/build-qemux86=5F64/tmp/work/=22<= /div>
Aren't you looking for =5ETMPDIR =3F

If use WORKDIR =3D TMPDIR/=22work=22= , it is still hard coding.


Martin,

<= div>Can you please point me to more details about this class - any backgr= ound or
discussions... Thanks.
Hi,

Well it works better then rm=5F= work with sstate and the original class is
from meta-micro (so = maybe ask pb if you want more details, but the class
is quite s= imple). I've just replaced last directory name because of this
= issue:

<= /blockquote>

Martin,

Hmm, my = understanding those are slightly different classes - rm=5Fwork cleans
WORKDIR after the build to save space, while this rm=5Fold=5Fwork= seems to clean
up before the build. I tried searching for any= previous discussions of this
class or any other rationale, bu= t even the commit itself doesn't provide much
explanation for = it...

Phil,

Do you mind= giving a short description of this peculiar rm=5Fold=5Fwork class=3F :) =
Thanks.

--
Denys


And I thin= k more people have different =22tmp/=22 part e.g. default would be
<= div>=22tmp-eglibc/=22 (thanks to TCLIBCAPPEND
meta/conf/distro/= defaultsetup.conf:TMPDIR .=3D =22=24=7BTCLIBCAPPEND=7D=22), but =22work=22= is
quite common.

meta/conf/bitbake.c= onf:
WORKDIR =3D =22=24=7BTMPDIR=7D/work/=24=7BMULTIMACH=5FTARG= ET=5FSYS=7D/=24=7BP=46=7D=22
meta-shr/classes/rm=5Fold=5Fwork.b= bclass:
WORKDIR =3D =22=24=7BTMPDIR=7D/work/=24=7BMULTIMACH=5FT= ARGET=5FSYS=7D/=24=7BPN=7D/=24=7BP=46=7D=22
meta-micro/classes/= rm=5Fold=5Fwork.bbclass:
WORKDIR =3D =22=24=7BTMPDIR=7D/work/=24= =7BMULTIMACH=5FTARGET=5FSYS=7D/=24=7BPN=7D/=24=7BEXTENDPE=7D=24=7BPV=7D-=24= =7BPR=7D=22

Cheers,


<= blockquote type=3D=22cite=22>
Regards,
Kai
<= br>
If get WORKDIR in this w= ay, I'll update the script with no argument
because the argumen= t is useless to identify the WORKDIR.

Regards,
Kai
since you alrea= dy call into bitbake in the script in question.

= Cheers,

Richard
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F
bitbake-devel mailing list

=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
bitbake-devel mailing list
=
--
Martin 'JaMa' Jansa jabber: Martin.Jansa=40gmail.com



=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F
bitbake-devel mailing list

--
Martin 'JaMa' Jansa jabb= er: Martin.Jansa=40gmail.= com



=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
bitbake-devel mailing list
=20 =20 =20 =20 =20

--4f67a726_515f007c_aa0-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vms173021pub.verizon.net ([206.46.173.21]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S9la0-0006R4-4T for bitbake-devel@lists.openembedded.org; Tue, 20 Mar 2012 00:01:32 +0100 Received: from gandalf.denix.org ([unknown] [71.178.225.66]) by vms173021.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0M15008IHJEIPE61@vms173021.mailsrvcs.net> for bitbake-devel@lists.openembedded.org; Mon, 19 Mar 2012 16:51:54 -0500 (CDT) Received: by gandalf.denix.org (Postfix, from userid 1000) id DF3E7201C0; Mon, 19 Mar 2012 17:51:53 -0400 (EDT) Date: Mon, 19 Mar 2012 17:51:53 -0400 From: Denys Dmytriyenko To: Christopher Larson Message-id: <20120319215153.GF15554@denix.org> References: <1331718176.18586.15.camel@ted> <4F61926D.1060709@windriver.com> <4F619CD4.4090103@windriver.com> <20120315080310.GC4973@jama.jama.net> <4F61B1D0.2080306@windriver.com> <20120315092122.GE4973@jama.jama.net> <20120315181844.GE30363@denix.org> <20120316064152.GA3855@jama.jama.net> <20120319203213.GC15554@denix.org> <9DB46E3A8C854D2595CB6F683FB6D1D0@gmail.com> MIME-version: 1.0 In-reply-to: <9DB46E3A8C854D2595CB6F683FB6D1D0@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: philb@gnu.org, Kang Kai , bitbake-devel@lists.openembedded.org, Martin Jansa Subject: Re: How to identify WORKDIR? X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2012 23:01:32 -0000 Content-type: text/plain; charset=us-ascii Content-disposition: inline On Mon, Mar 19, 2012 at 02:37:42PM -0700, Christopher Larson wrote: > rm_old_work seems to do exactly what it sounds like. It removes *old* > workdirs from previous versions of the recipe to keep it from bloating > without bound if you retain the same tmpdir. Correct, that's my understanding as well. But it's not meant to replace rm_work, as it can't save space the same way during the build - by the time your build is done, you are using 100% of what WORKDIR would have been w/o this class in the case of a clean build . It prevents the size to grow beyond that point though... I was just trying to clarify this statement, suggesting they both serve the same purpose: > Well it works better then rm_work with sstate -- Denys > On Monday, March 19, 2012 at 1:32 PM, Denys Dmytriyenko wrote: > > > On Fri, Mar 16, 2012 at 07:41:52AM +0100, Martin Jansa wrote: > > > On Thu, Mar 15, 2012 at 02:18:44PM -0400, Denys Dmytriyenko wrote: > > > > On Thu, Mar 15, 2012 at 10:21:22AM +0100, Martin Jansa wrote: > > > > > On Thu, Mar 15, 2012 at 05:09:36PM +0800, Kang Kai wrote: > > > > > > On 2012???03???15??? 16:03, Martin Jansa wrote: > > > > > > > On Thu, Mar 15, 2012 at 03:40:04PM +0800, Kang Kai wrote: > > > > > > > > On 2012???03???15??? 14:55, Kang Kai wrote: > > > > > > > > > On 2012???03???14??? 17:42, Richard Purdie wrote: > > > > > > > > > > On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote: > > > > > > > > > > > Hi All, > > > > > > > > > > > > > > > > > > > > > > I write a script to clean up WORKDIR that remove the obsoleted > > > > > > > > > > > packages' build directories. > > > > > > > > > > > The script accept a argument as BUILDDIR and I use this clause to > > > > > > > > > > > identify the WORKDIR: > > > > > > > > > > > > > > > > > > > > > > workdir = os.path.join(builddir, 'tmp/work') > > > > > > > > > > > > > > > > > > > > > > Then validate the workdir exists or not. It works for me but hardcode > > > > > > > > > > > here as Richard point out. > > > > > > > > > > > So is there a better way to get the WORKDIR here? Thanks. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I was thinking of something like: > > > > > > > > > > > > > > > > > > > > bitbake -e | grep ^WORKDIR > > > > > > > > And the result is something like that: > > > > > > > > WORKDIR="/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/x86_64-poky-linux/bblayers-1.0-r0" > > > > > > > > > > > > > > > > Is it ok to remove 2 items seperated by slash at the end of string? > > > > > > > > Right now is: > > > > > > > > "/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/" > > > > > > > > > > > > > > > > > > > > > > Aren't you looking for ^TMPDIR ? > > > > > > > > > > > > > > > > > > > > > > > > > If use WORKDIR = TMPDIR/"work", it is still hard coding. > > > > > > > > > > Assuming 2 items at the end won't work for people using rm_old_work: > > > > > http://git.openembedded.org/meta-micro/commit/?id=fcf525654915edb9650f1a6c2852f336366f8b2f > > > > > or slightly different version: > > > > > http://git.shr-project.org/git/?p=meta-smartphone.git;a=blob;f=meta-shr/classes/rm_old_work.bbclass > > > > > > > > > > > > > > > > > Martin, > > > > > > > > Can you please point me to more details about this class - any background or > > > > discussions... Thanks. > > > > > > > > > > > > > Hi, > > > > > > Well it works better then rm_work with sstate and the original class is > > > from meta-micro (so maybe ask pb if you want more details, but the class > > > is quite simple). I've just replaced last directory name because of this > > > issue: > > > > > > http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=0d4c17de1ba7343d82bb10c311754e29d573c485 > > > > Martin, > > > > Hmm, my understanding those are slightly different classes - rm_work cleans > > WORKDIR after the build to save space, while this rm_old_work seems to clean > > up before the build. I tried searching for any previous discussions of this > > class or any other rationale, but even the commit itself doesn't provide much > > explanation for it... > > > > Phil, > > > > Do you mind giving a short description of this peculiar rm_old_work class? :) > > Thanks. > > > > -- > > Denys > > > > > > > > > And I think more people have different "tmp/" part e.g. default would be > > > > > "tmp-eglibc/" (thanks to TCLIBCAPPEND > > > > > meta/conf/distro/defaultsetup.conf:TMPDIR .= "${TCLIBCAPPEND}"), but "work" is > > > > > quite common. > > > > > > > > > > meta/conf/bitbake.conf: > > > > > WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}" > > > > > meta-shr/classes/rm_old_work.bbclass: > > > > > WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${PF}" > > > > > meta-micro/classes/rm_old_work.bbclass: > > > > > WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" > > > > > > > > > > Cheers, > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > Kai > > > > > > > > > > > > > > > > > If get WORKDIR in this way, I'll update the script with no argument > > > > > > > > > because the argument is useless to identify the WORKDIR. > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > Kai > > > > > > > > > > since you already call into bitbake in the script in question. > > > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > > > > > > > > > > > > Richard > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > bitbake-devel mailing list > > > > > > > > > bitbake-devel@lists.openembedded.org (mailto:bitbake-devel@lists.openembedded.org) > > > > > > > > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > bitbake-devel mailing list > > > > > > > > bitbake-devel@lists.openembedded.org (mailto:bitbake-devel@lists.openembedded.org) > > > > > > > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com (mailto:Martin.Jansa@gmail.com) > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > bitbake-devel mailing list > > > > > bitbake-devel@lists.openembedded.org (mailto:bitbake-devel@lists.openembedded.org) > > > > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > > > > > > > > > > > > > > > > > > > > > -- > > > Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com (mailto:Martin.Jansa@gmail.com) > > > > > > > > > > > > > _______________________________________________ > > bitbake-devel mailing list > > bitbake-devel@lists.openembedded.org (mailto:bitbake-devel@lists.openembedded.org) > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > > > > >