Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Xiaofeng Yan <xiaofeng.yan@windriver.com>
To: Saul Wold <sgw@linux.intel.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [oe] Source Archiver Class
Date: Thu, 23 Feb 2012 10:24:10 +0800	[thread overview]
Message-ID: <4F45A34A.6010708@windriver.com> (raw)
In-Reply-To: <4F43CD0C.8050700@linux.intel.com>


On 2012年02月22日 00:57, Saul Wold wrote:
> On 02/19/2012 10:40 PM, Xiaofeng Yan wrote:
>> On 2012年02月18日 07:52, Saul Wold wrote:
>>>

Hi Saul,

I have implemented the most functions but srpm functions. I will 
complete the left work(merge functions from sourcepkg, src_distribute  
to archiver.bbclass, implement srpm functions. )

>>> Xiaofeng & Community:
>>>
>>> We had a chat with Chris Larson and Mark Hatle here at ELC.
>>>
>>> We focused this issue down to a fewer number of options that meet the
>>> needs of the licenses. Please review this and let us know if there are
>>> any issues or concerns.
>>>
>>>
>> Hi Saul,
>>
>> I comment my understanding as follow:
>>> Best Practices:
>>> - Archive during build, we do not support nor recommend post archiving
>>> - Original tarball and patches w/ordering file (maybe comment the
>>> series), grab non-patch files also.
>> for example:
>> file://a.patch
>> file://b.config.in
>> we also archive b.config.in.
>
> Yes, correct.
>
>>> - Unless requesting configured sources, which will just be the
>>> configured source tarball
>>> - Grab temp as postfunc of do_package - latest logs via links & pid
>>>
>> That means logs package include all of logs in temp. for example.
>> You has described a following function we will realize at the previous
>> email.
>> 3 - Original Source code & Patches & temp (scripts & logs)
>>
>> source codes and patches should be in the stage do_patch[postfunc] = "
>> do_get_source"
>> logs should be in the stage do_package[postfunc] = " do_get_logs"
>> So logs file shouldn't be archived in do_patch[postfunc] = " 
>> do_get_logs"
>> The logs in the stage of do_packge are more than do_patch.
>>
> Correct, you want to get the logs and scripts from temp when they are 
> most complete (after do_package not after do_patch).
>
> As mentioned below, you would use the variable SOURCE_ARCHIVE_LOG in 
> the do_package[postfunc] to determine if you need to archive the logs 
> or not.
>
>
>>> For sstate Builds (LATER):
>>> - need to verify that fetch/patch/configure will get re-run for 
>>> archiving
>>> - Add temp dir to sstate capture (without links)
>>>
>>> 3 Implementations classes
>>> - Filter in oe/lib/license.py
>>> - source_archive.bb
>>> - archives tarballs to ${BP}/...
>>> - reuse copyleft_compliance for patch handling
>>> - srpm
>>> - take output from above and create SRPM - (LATER)
>>>
>> We will do the archive work according the license . I will implement two
>> functions, one is for left, the other for right.
> I am not sure what you mean by one is for left and the other is for 
> right?
>
> Can you explain your thoughts here.
I mean I need implement a function to select to archive the packages 
from copyright(no free)or copyleft(free).
>
>
>>> 2 Configuration classes
>>> - uses prefunc/postfunc at correct place
>>> - Original Tarball / Patches
>>> - Post Configuration
>>>
>> We can define 8 classes to complete 8 kinds of archiving methods. every
>> class will inherit archiver.bbclass.
>
> I am not sure we need 8 classes anymore, that was the point of this 
> email to simplify the needs.
>
> 2 Classes:
>
> source_patches.bbclass
>  - Original Tarball & Patches & Other files
>  - do_patch[postfunc] = <archive ${S}/patches with Original tarball>
>  - Included temp dir if enabled via SOURCE_ARCHIVE_LOG
>
> configured_source.bbclass
>  - Get the ${S} dir (or $S & any build dir) after do_configure
>  - do_configure[postfunc] = <archive configured source>
>  - Include temp dir if enabled via SOURCE_ARCHIVE_LOG
>
>
got it, thanks
>> and then realize do_stage[prefunc/postfunc] in this class.
>> stage include unpack, patch, configure, build package and so on.
>> for example. we want only to get original tarball, then we can define a
>> bbclass named "source.bbclass"
>> source.bbclass:
>> inherit archiver.bbclass
>> do_unpack[postfunc] = " do_get_source"
>>
>> if we want to get both original and patches tarball, then we can define
>> bbclass names "source_patches.bbclass"
>> source_patches.bbclass
>> inherit archiver.bbclass
>> do_unpack[postfunc] = " do_get_source_patches"
>>
>>> SOURCE_ARCHIVE_PACKAGE_TYPE = {tar, srpm}
>>> SOURCE_ARCHIVE_LOG = {True, False}
>>>
>>> Please let us know if you have any questions.
>>>
>>> Sau!
>>>
>> If my understanding don't meet your ideas, Please correct me.
>>
> I should be available via IRC in your afternoon, I will be away during 
> your morning.
>
> Sau!
>
>> Thanks for your help very much.
>>
>> Thanks
>> Yan
>>> On 02/15/2012 05:19 PM, Xiaofeng Yan wrote:
>>>
>>
>




  reply	other threads:[~2012-02-23  2:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26 20:56 Source Archiver Class Saul Wold
     [not found] ` <4F24F672.5090107@linux.intel.com>
2012-02-13 10:41   ` [oe] " Xiaofeng Yan
2012-02-14 16:51     ` Saul Wold
2012-02-15 15:23       ` Saul Wold
2012-02-16  1:19         ` Xiaofeng Yan
2012-02-17 23:52           ` Saul Wold
2012-02-20  6:40             ` Xiaofeng Yan
2012-02-21 16:57               ` Saul Wold
2012-02-23  2:24                 ` Xiaofeng Yan [this message]
2012-02-23  2:41                   ` Chris Larson

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=4F45A34A.6010708@windriver.com \
    --to=xiaofeng.yan@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=sgw@linux.intel.com \
    /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