From: Kang Kai <Kai.Kang@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: How to identify WORKDIR?
Date: Thu, 15 Mar 2012 15:40:04 +0800 [thread overview]
Message-ID: <4F619CD4.4090103@windriver.com> (raw)
In-Reply-To: <4F61926D.1060709@windriver.com>
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/"
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
next prev parent reply other threads:[~2012-03-15 7:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 9:01 How to identify WORKDIR? Kang Kai
2012-03-14 9:42 ` Richard Purdie
2012-03-15 6:55 ` Kang Kai
2012-03-15 7:40 ` Kang Kai [this message]
2012-03-15 8:03 ` Martin Jansa
2012-03-15 9:09 ` Kang Kai
2012-03-15 9:21 ` Martin Jansa
2012-03-15 9:34 ` Kang Kai
2012-03-15 18:18 ` Denys Dmytriyenko
2012-03-16 6:41 ` Martin Jansa
2012-03-19 20:32 ` Denys Dmytriyenko
2012-03-19 21:37 ` Christopher Larson
2012-03-19 21:51 ` Denys Dmytriyenko
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=4F619CD4.4090103@windriver.com \
--to=kai.kang@windriver.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox