<?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>13171</bug_id>
          
          <creation_ts>2019-02-05 13:26:03 +0000</creation_ts>
          <short_desc>archiver rpm mode is broken</short_desc>
          <delta_ts>2019-02-09 18:42:48 +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>Scripts and Tools</component>
          <version>2.7</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.7</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>ross.burton</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>82963</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-02-05 13:26:03 +0000</bug_when>
    <thetext>There are several problems:

Nothing ever cleans ARCHIVER_TOPDIR when tasks rerun

do_package_write_rpm writes to ARCHIVER_TOPDIR which isn&apos;t captured by that task&apos;s sstate. If that task were restored from sstate the archive would be missing which would be silently ignored.

The inverse issue is also present, other tasks may be skipped on subsequent runs meaning incomplete files may be present.

| error: create archive failed on file /media/build1/poky/build/tmp/work/all-poky-linux/xcursor-transparent-theme/0.1.1+gitAUTOINC+23c8af5ba4-r0/deploy-sources/allarch-poky-linux/xcursor-transparent-theme-0.1.1+gitAUTOINC+23c8af5ba4-r0/xcursor-transparent-theme-0.1.1+git0+23c8af5ba4-r0.src.rpm: cpio: read failed - No such file or directory
| Building target platforms: noarch-poky-linux
| Building for target noarch-poky-linux

This is caused by:

$ cat log.task_order

do_cleansstate (24289): log.do_cleansstate.24289
do_deploy_archives_setscene (24395): log.do_deploy_archives_setscene.24395
do_fetch (24407): log.do_fetch.24407
[..]
do_package_write_rpm (25448): log.do_package_write_rpm.25448
do_package_qa (25451): log.do_package_qa.25451

So do_deploy_archives can from sstate, created a .src.rpm in WORKDIR/deploy-sources, then it was removed when rpm was running.

A quick fix is:
            source_list = os.listdir(ar_outdir)
            source_number = 0
            for source in source_list:
+                if source.endswith(&quot;.rpm&quot;):
+                    continue

in package_rpm.bbclass however this just hacks around the problem.

Not sure how to fix the problems with the current codebase :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82975</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-02-09 18:42:48 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=251ded90d4ad75da5e110e916068050f15ace07c fixes the worst problems in the rpm section of things,</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>