<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    On 2012&#24180;03&#26376;06&#26085; 06:18, Saul Wold wrote:
    <blockquote cite="mid:4F553BB5.9040405@linux.intel.com" type="cite">On
      03/03/2012 02:54 AM, Xiaofeng Yan wrote:
      <br>
      <blockquote type="cite">From: Xiaofeng
        Yan<a class="moz-txt-link-rfc2396E" href="mailto:xiaofeng.yan@windriver.com">&lt;xiaofeng.yan@windriver.com&gt;</a>
        <br>
        <br>
        This is configuration file to point to what content a archive
        package
        <br>
        should include in the different stage of task by pointing to
        different variable and
        <br>
        stage.
        <br>
        <br>
      </blockquote>
      Xiaogeng,
      <br>
      <br>
      You are on the right path with this one, but what was originally
      talked about was having multiple archiver bbclasses that did the
      configuration and set when the archive would take place.
      <br>
      <br>
      Than one could just inherit the bbclass that matches their needs,
      so there should be a bbclass that's equivalent to the current
      copyleft bbclass. And as we defined in earlier emails the 3-4
      archives, we should have matching bbclasses for those.
      <br>
      <br>
    </blockquote>
    Thanks for your reply. <br>
    <blockquote cite="mid:4F553BB5.9040405@linux.intel.com" type="cite">1)
      Original Source &amp; Patches w/ Series file &amp; other files
      <br>
    </blockquote>
    This needs two bbclass named for
    "tar_original_source_patch_serires_scripts_logs.bblcass" and
    "srpm_original_source_patch_serires_scripts_logs.bblcass".
    archiver.bbclass should be inherited in two bbclass.<br>
    <br>
    "scripts" include .bb and .inc files.<br>
    "logs" include temp.<br>
    I take zlib for an example with tar type:<br>
    step 1: inherit tar_original_source_patch_serires_scripts_logs in
    pakcage_rpm.bbclass. <br>
    step 2:<br>
    <i>$bitbake zlib</i><br>
    step 3:<br>
    <i>$ ls&nbsp; tmp/deploy/sources/i586-poky-linux/<font color="#cc0000">Zlib</font>/zlib-1.2.6-r1/<br>
      <font color="#3333ff">zlib-1.2.6-r1-patches.tar.gz&nbsp;
        zlib-1.2.6-r1-prepatch.tar.gz&nbsp; zlib-1.2.6-r1-script-logs.tar.gz</font></i><br>
    <br>
    I <span class="label_list">organize the</span> directory to deploy
    archiving package with the following mode.<br>
    tar_sources = d.getVar('DEPLOY_DIR', True) + '/sources/' +
    target_sys + '/' + licenses + '/' + pf<br>
    here:<br>
    <br>
    target_sys is&nbsp; i586-poky-linux<br>
    <font color="#cc0000">Zlib</font> is license of package zlib<br>
    pf is "zlib-1.2.6-r1"<br>
    <i><font color="#3333ff"> </font></i><font color="#3333ff"><font
        color="#000000">zlib-1.2.6-r1-prepatch.tar.gz</font></font><font
      color="#000000">&nbsp; include original sources<br>
      zlib-1.2.6-r1-patches.tar.gz include patches and series <br>
    </font><font color="#3333ff"><font color="#000000">zlib-1.2.6-r1-script-logs.tar.gz
        include temp with .bb and .inc files<br>
      </font></font><i><font color="#3333ff"><br>
      </font></i><font color="#3333ff"><font color="#000000">if we want
        to get srpm package. we should inherit </font></font>srpm_original_source_patch_serires_scripts_logs.bblcass
    in package_rpm.bbclass<br>
    $bitbake zlib <br>
    $ls <i>tmp/deploy/sources/deploy-srpm/i586/Zlib/</i><br>
    zlib-1.2.6-r1.src.rpm<br>
    <i><font color="#3333ff"><br>
      </font></i>
    <blockquote cite="mid:4F553BB5.9040405@linux.intel.com" type="cite">2)
      Patched &amp; Configured Source &amp; temp dir
      <br>
    </blockquote>
    This needs four bbclass <br>
    tar_patched_sources_logs.bbclass<br>
    tar_configured_sources_logs.bbclass<br>
    srpm_patched_sources_logs.bbclass<br>
    srpm_configured_sources_logs.bbclass<br>
    <br>
    <blockquote cite="mid:4F553BB5.9040405@linux.intel.com" type="cite">3)
      Copyleft Equivlant (so we can remove that class also)
      <br>
    </blockquote>
    I only inherit this class in archiver.bbclass in V1 without merging
    it to archiver.bbclass.&nbsp; I can merge this class if you want.&nbsp; <br>
    <br>
    &nbsp;I think we can define some variables like
    SOURCE_ARCHIVE_PACKAGE_TYPE = {'tar','srpm'} and
    SOURCE_ARCHIVE_LOGS_WITH_SCRIPTS = 'True'<br>
    SOURCE_ARCHIVE_LOGS = 'True' in conf/local.conf to reduce the number
    of archive bbclass. <br>
    <br>
    I will send you the V2 according to your reply.<br>
    <b> </b><br>
    I do apologize about my design can't meet your requirement. &nbsp; <br>
    <blockquote cite="mid:4F553BB5.9040405@linux.intel.com" type="cite">
      <br>
      Sau!
      <br>
      <br>
      <br>
      <blockquote type="cite">[YOCTO #1977]
        <br>
        <br>
        Signed-off-by: Xiaofeng Yan<a class="moz-txt-link-rfc2396E" href="mailto:xiaofeng.yan@windriver.com">&lt;xiaofeng.yan@windriver.com&gt;</a>
        <br>
        <br>
        Signed-off-by: Xiaofeng Yan<a class="moz-txt-link-rfc2396E" href="mailto:xiaofeng.yan@windriver.com">&lt;xiaofeng.yan@windriver.com&gt;</a>
        <br>
        ---
        <br>
        &nbsp; meta/classes/archiver_configure.bbclass |&nbsp;&nbsp; 35
        +++++++++++++++++++++++++++++++
        <br>
        &nbsp; 1 files changed, 35 insertions(+), 0 deletions(-)
        <br>
        &nbsp; create mode 100644 meta/classes/archiver_configure.bbclass
        <br>
        <br>
        diff --git a/meta/classes/archiver_configure.bbclass
        b/meta/classes/archiver_configure.bbclass
        <br>
        new file mode 100644
        <br>
        index 0000000..c9892d3
        <br>
        --- /dev/null
        <br>
        +++ b/meta/classes/archiver_configure.bbclass
        <br>
        @@ -0,0 +1,35 @@
        <br>
        +# This file is for getting tarball in different stage for
        sources, patches, and logs by configuring
        <br>
        +# the following variable and tasks
        <br>
        +
        <br>
        +inherit archiver
        <br>
        +
        <br>
        +# SOURCE_ARCHIVE_PACKAGE_TYPE = {'tar','srpm'}
        <br>
        +SOURCE_ARCHIVE_PACKAGE_TYPE = 'tar'
        <br>
        +
        <br>
        +# SOURCE_ARCHIVE_LOG_WITH_SCRIPTS = {'logs_with_scripts',
        'logs'}
        <br>
        +# String 'logs_with_scripts' include temp directory and .bb and
        .inc file
        <br>
        +# String 'logs' only include temp
        <br>
        +SOURCE_ARCHIVE_LOG_WITH_SCRIPTS = 'logs_with_scripts'
        <br>
        +
        <br>
        +# PATCHES_ARCHIVE_WITH_SERIES = {'true', 'false'}
        <br>
        +# Strings 'true' means that patches including series
        files(series + non-applying)
        <br>
        +# String 'false' means that no series and only archive applying
        patches
        <br>
        +PATCHES_ARCHIVE_WITH_SERIES = 'true'
        <br>
        +
        <br>
        +# Archive packages for copy-left
        <br>
        +#COPYLEFT_COMPLIANCE = 'true'
        <br>
        +
        <br>
        +# Open this item when you want to get original sources tarball
        with patches
        <br>
        +do_unpack[postfuncs] += "do_archive_original_sources_patches "
        <br>
        +
        <br>
        +# Open this item when you want to get tarball for patched
        sources including patches
        <br>
        +#do_patch[postfuncs] += "do_archive_patched_sources "
        <br>
        +
        <br>
        +# Open this item when you want to get tarball for configured
        sources including patches
        <br>
        +#do_configure[postfuncs] += "do_archive_configured_sources "
        <br>
        +
        <br>
        +# Open this item when you want to get tarball for logs tarball
        <br>
        +do_package_write_rpm[prefuncs] += "do_archive_scripts_logs "
        <br>
        +
        <br>
        +# Get dump date and create diff file
        <br>
        +do_package_write_rpm[postfuncs] += "do_dumpdata_create_diff_gz
        "
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>