[OE-core] [PATCH 2/21] Add directory information to the pkgdata files

Mark Hatle mark.hatle at windriver.com
Wed May 29 16:30:25 UTC 2013


On 5/29/13 10:59 AM, Martin Jansa wrote:
> On Wed, May 29, 2013 at 10:09:44AM -0500, Mark Hatle wrote:
>> Add S(ource) and B(uild) directory information to the recipe pkgdata files.
>> This allows external tools to find the appropriate information, and be able
>> to easily access the corresponding sources and build directories.
>>
>> Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
>> ---
>>   meta/classes/package.bbclass | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
>> index 02a1460..19b2b4c 100644
>> --- a/meta/classes/package.bbclass
>> +++ b/meta/classes/package.bbclass
>> @@ -1124,6 +1124,8 @@ python emit_pkgdata() {
>>
>>       data_file = pkgdatadir + d.expand("/${PN}" )
>>       f = open(data_file, 'w')
>> +    f.write("S: %s\n" % d.expand("${S}"))
>> +    f.write("B: %s\n" % d.expand("${B}"))
>>       f.write("PACKAGES: %s\n" % packages)
>>       f.close()
>
> how does this interact with sstate? does setscene task create
> pkgdata with right paths?
>

The pkgdata is always current to the current build/work directory.  When the 
sstate-cache runs, and the associated pkgdata is dumped to the disk the S and B 
for the current directory is written.  But when sstate-cache is used, there is 
no extracted source (or build) components so those directories remain unresolved.

It's up to the tooling that are using these files to check if the directory 
exists, if it does not -- then using bitbake -c patch <recipe> will create it. 
(even in the sstate-cache case.)

--Mark



More information about the Openembedded-core mailing list