<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>5113</bug_id>
          
          <creation_ts>2013-09-04 09:07:32 +0000</creation_ts>
          <short_desc>archive*.bbclass: need refactor</short_desc>
          <delta_ts>2014-03-24 01:30:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=4986</see_also>
    
    <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=5740</see_also>
    
    <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=5730</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.6 M4</target_milestone>
          
          <blocked>5730</blocked>
    
    <blocked>5740</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>valentin.cobelea</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>36242</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-09-04 09:07:32 +0000</bug_when>
    <thetext>We have this command in archiver.bbclass:

diff -Naur src_dir.org src_dir &gt; files.diff

But there is no src_dir.org, the org should be a typo, it should be orig, but there is also no src_dir.orig.

This command is originally from sourcepkg.bbclass, but we had used it wrongly so we missed the src_dir.orig, as a result is that we put all the files in the files.diff now, this is incorrect.

Another thing which confuses me is the following code:

    distro = d.getVar(&apos;DISTRO&apos;,True) or &quot;&quot;
    dest = current_wd + &apos;/&apos; + distro + &apos;/files&apos;
    if not os.path.exists(dest):
        bb.utils.mkdirhier(dest)
    for i in os.listdir(current_wd):
        if os.path.isfile(i):
            try:
                shutil.copy(i, dest)
            except IOError:
                subprocess.call(&apos;fakeroot cp -rf &apos; + i + &quot; &quot; + dest, shell=True)

We copy the regular files from the top dir of ${S} to ${S}/poky/files/ directory, this is also from the sourcepkg.bbclass, I don&apos;t understand what is it used for, and I can&apos;t find its history from the git log, I&apos;d like to remove it if you are fine with it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36519</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-09-11 06:10:48 +0000</bug_when>
    <thetext>After more investigations, a lot of problems are found int the following 4 classes:

archive-configured-source.bbclass
archive-original-source.bbclass
archive-patched-source.bbclass
archiver.bbclass

1) As said in the first comment, there is no src_dir.org, the org should be a typo, it should be orig, but there is also no src_dir.orig, it&apos;s not easy to fix it if we won&apos;t change a lot of the code.

2) As said in the first commit, the subprocess.call(&apos;fakeroot cp -rf &apos; + i + &quot; &quot; + dest, shell=True) is useless should be removed

3) There are a lot of duplicated code in the following 4 classes.

4) The task do_dumpdata_create_diff_gz is unreasonable, we should divide
   them into 2 tasks, do_dumpdata and do_create_diff_gz

5) It doesn&apos;t archive the native or gcc recipe, I think that we should.

6) The configuration isn&apos;t clear enough.

7) I think that the 3 archive-*-source.bbclass are not needed, we can put
   them into archiver.bbclass, and control the actions through the 
   configurations.

8) The work flow isn&apos;t reasonable

Generally speaking, it needs re-factor, but I don&apos;t think that it&apos;s a
good idea to re-work it at the moment, I&apos;d like to do it in the next
release, so move it 1.6.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41596</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2014-03-24 01:29:25 +0000</bug_when>
    <thetext>Merged into master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=cbcf5b219858b58c4429ee87444eaacc5a7cfa3e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41597</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2014-03-24 01:30:45 +0000</bug_when>
    <thetext>Merged into master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=cbcf5b219858b58c4429ee87444eaacc5a7cfa3e</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>