<?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>2272</bug_id>
          
          <creation_ts>2012-04-10 08:37:03 +0000</creation_ts>
          <short_desc>Archive source failed when build image</short_desc>
          <delta_ts>2023-11-17 07:36:26 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>1.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>(1.2)test</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Xiaofeng Yan">Xiaofeng.yan</assigned_to>
          <cc>181262679</cc>
    
    <cc>jiajun.xu</cc>
    
    <cc>liang.li2</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>20114</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2012-04-10 08:37:03 +0000</bug_when>
    <thetext>Tree/branch: poky/1.2_M4
Commit: 27aa5489fb40d99c58bb2a4bbf2311e2c502a091

Following the meta-yocto/conf/local.conf.sample.extended to add source archiving feature in my local.conf:

##################
...
INHERIT =+ &quot;archive-original-source&quot;

SOURCE_ARCHIVE_PACKAGE_TYPE ?= &apos;tar&apos; 
SOURCE_ARCHIVE_LOG_WITH_SCRIPTS ?= &apos;logs_with_scripts&apos;
...
##################

When running &quot;bitbake core-imamge-minmal&quot;, I got the following error:
##############
ERROR: Error executing a python function in /buildarea2/yzhao-test/poky-test/meta/recipes-core/zlib/zlib_1.2.6.bb:
IOError: [Errno 2] No such file or directory: &apos;/buildarea2/yzhao-test/poky-test/build-archive/downloads/zlib-1.2.6.tar.bz2&apos;

ERROR: The stack trace of python calls that resulted in this exception/failure was:
ERROR:   File &quot;do_archive_original_sources_patches&quot;, line 6, in &lt;module&gt;
ERROR: 
ERROR:   File &quot;do_archive_original_sources_patches&quot;, line 3, in do_archive_original_sources_patches
ERROR: 
ERROR:   File &quot;archiver.bbclass&quot;, line 21, in archive_sources_patches
ERROR: 
ERROR:   File &quot;archiver.bbclass&quot;, line 18, in move_tarball_deploy
ERROR: 
ERROR:   File &quot;/usr/lib/python2.7/shutil.py&quot;, line 298, in move
ERROR:     copy2(src, real_dst)
ERROR: 
ERROR:   File &quot;/usr/lib/python2.7/shutil.py&quot;, line 127, in copy2
ERROR:     copyfile(src, dst)
ERROR: 
ERROR:   File &quot;/usr/lib/python2.7/shutil.py&quot;, line 81, in copyfile
ERROR:     with open(src, &apos;rb&apos;) as fsrc:
ERROR: 
ERROR: The code that was being executed was:
ERROR:      0002:def do_archive_original_sources_patches(d):
ERROR:      0003:	archive_sources_patches(d,&apos;prepatch&apos;)
ERROR:      0004:
ERROR:      0005:
ERROR:  *** 0006:do_archive_original_sources_patches(d)
ERROR:      0007:
ERROR: (file: &apos;do_archive_original_sources_patches&apos;, lineno: 6, function: &lt;module&gt;)
ERROR:      0001:
ERROR:      0002:def do_archive_original_sources_patches(d):
ERROR:  *** 0003:	archive_sources_patches(d,&apos;prepatch&apos;)
ERROR:      0004:
ERROR:      0005:
ERROR:      0006:do_archive_original_sources_patches(d)
ERROR:      0007:
ERROR: (file: &apos;do_archive_original_sources_patches&apos;, lineno: 3, function: do_archive_original_sources_patches)
ERROR: Function failed: do_archive_original_sources_patches
ERROR: Logfile of failure stored in: /buildarea2/yzhao-test/poky-test/build-archive/tmp/work/ppc603e-poky-linux/zlib-1.2.6-r1/temp/log.do_unpack.18767
NOTE: package zlib-1.2.6-r1: task do_unpack: Failed

#############

I&apos;m sure that the zlib-1.2.6.tar.bz2 existed in the download directory before built. 

Then I copied the zlib tarball to the download direcotry and ran &quot;bitbake zilib&quot;. I got the same error:
##########
ERROR: Error executing a python function in /buildarea2/yzhao-test/poky-test/meta/recipes-core/zlib/zlib_1.2.6.bb:
IOError: [Errno 2] No such file or directory: &apos;/buildarea2/yzhao-test/poky-test/build-archive/downloads/zlib-1.2.6.tar.bz2&apos;

ERROR: The stack trace of python calls that resulted in this exception/failure was:
ERROR:   File &quot;do_archive_original_sources_patches&quot;, line 6, in &lt;module&gt;
ERROR: 
ERROR:   File &quot;do_archive_original_sources_patches&quot;, line 3, in do_archive_original_sources_patches
ERROR: 
ERROR:   File &quot;archiver.bbclass&quot;, line 21, in archive_sources_patches
ERROR: 
ERROR:   File &quot;archiver.bbclass&quot;, line 18, in move_tarball_deploy
ERROR: 
ERROR:   File &quot;/usr/lib/python2.7/shutil.py&quot;, line 298, in move
ERROR:     copy2(src, real_dst)
ERROR: 
ERROR:   File &quot;/usr/lib/python2.7/shutil.py&quot;, line 127, in copy2
ERROR:     copyfile(src, dst)
ERROR: 
ERROR:   File &quot;/usr/lib/python2.7/shutil.py&quot;, line 81, in copyfile
ERROR:     with open(src, &apos;rb&apos;) as fsrc:
ERROR: 
ERROR: The code that was being executed was:
ERROR:      0002:def do_archive_original_sources_patches(d):
ERROR:      0003:	archive_sources_patches(d,&apos;prepatch&apos;)
ERROR:      0004:
ERROR:      0005:
ERROR:  *** 0006:do_archive_original_sources_patches(d)
ERROR:      0007:
ERROR: (file: &apos;do_archive_original_sources_patches&apos;, lineno: 6, function: &lt;module&gt;)
ERROR:      0001:
ERROR:      0002:def do_archive_original_sources_patches(d):
ERROR:  *** 0003:	archive_sources_patches(d,&apos;prepatch&apos;)
ERROR:      0004:
ERROR:      0005:
ERROR:      0006:do_archive_original_sources_patches(d)
ERROR:      0007:
ERROR: (file: &apos;do_archive_original_sources_patches&apos;, lineno: 3, function: do_archive_original_sources_patches)
ERROR: Function failed: do_archive_original_sources_patches
ERROR: Logfile of failure stored in: /buildarea2/yzhao-test/poky-test/build-archive/tmp/work/ppc603e-poky-linux/zlib-1.2.6-r1/temp/log.do_unpack.27153
NOTE: package zlib-1.2.6-r1: task do_unpack: Failed
#################

And the zilib tarball in download directory had been removed!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20217</commentid>
    <comment_count>1</comment_count>
    <who name="Xiaofeng Yan">Xiaofeng.yan</who>
    <bug_when>2012-04-12 02:29:36 +0000</bug_when>
    <thetext>The patch for fixing this bug has been merged into oe-core:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5fb36b041c612b80cf35d6ecd35bddd1e108a210</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20496</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2012-04-17 06:47:48 +0000</bug_when>
    <thetext>Verified with 1.2 rc3.

Tree/branch: poky/1.2_M4
Commit: fae1c7a5fdcea199338b5f91efaafd7c72aec5dd</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>