<?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>10758</bug_id>
          
          <creation_ts>2016-12-02 00:04:53 +0000</creation_ts>
          <short_desc>rm_work causes subsequent image builds to fail</short_desc>
          <delta_ts>2017-01-02 22:53:42 +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>2.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></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Randy Witt">randy.e.witt</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          <qa_contact name="David Lopez Barriba">davidx.lopez.barriba</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</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>68802</commentid>
    <comment_count>0</comment_count>
    <who name="Randy Witt">randy.e.witt</who>
    <bug_when>2016-12-02 00:04:53 +0000</bug_when>
    <thetext>On master:9e63f81c78e284c9b325fe04a1b59e61c7ad8a1a this problem occurs. git bisect says that it started with commit fd1b82e0bd13cfc9f35c60505b97d4cb990afff2.


Steps to reproduce:

1. Add INHERIT += &quot;rm_work&quot; to local.conf
2. bitbake core-image-minimal
3. bitbake core-image-minimal


The second build will fail with a message similar to:

NOTE: Executing RunQueue Tasks
ERROR: core-image-minimal-1.0-r0 do_image: Function failed: prelink_image (log file is located at /home/rewitt/builds/poky-builds/test/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image.207)
ERROR: Logfile of failure stored in: /home/rewitt/builds/poky-builds/test/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image.207
Log data follows:
| DEBUG: Executing python function do_image
| NOTE: Executing mklibs_optimize_image ...
| DEBUG: Executing shell function mklibs_optimize_image
| DEBUG: Shell function mklibs_optimize_image finished
| NOTE: Executing prelink_setup ...
| DEBUG: Executing python function prelink_setup
| DEBUG: Python function prelink_setup finished
| NOTE: Executing prelink_image ...
| DEBUG: Executing shell function prelink_image
| du: cannot access &apos;/home/rewitt/builds/poky-builds/test/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs&apos;: No such file or directory
| Size before prelinking .
| cp: cannot create regular file &apos;/home/rewitt/builds/poky-builds/test/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/prelink.conf&apos;: No such file or directory
| WARNING: /home/rewitt/builds/poky-builds/test/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/run.prelink_image.207:1 exit 1 from &apos;cp /home/rewitt/builds/poky-builds/test/tmp/sysroots/x86_64-linux/etc/prelink.conf /home/rewitt/builds/poky-builds/test/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/prelink.conf&apos;
| DEBUG: Python function do_image finished
| ERROR: Function failed: prelink_image (log file is located at /home/rewitt/builds/poky-builds/test/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image.207)
ERROR: Task (/home/rewitt/src/poky-test/meta/recipes-core/images/core-image-minimal.bb:do_image) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 2217 tasks of which 2215 didn&apos;t need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/rewitt/src/poky-test/meta/recipes-core/images/core-image-minimal.bb:do_image
Summary: There was 1 ERROR message shown, returning a non-zero exit code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68948</commentid>
    <comment_count>1</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-12-08 16:02:04 +0000</bug_when>
    <thetext>*** Bug 10770 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68960</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-12-08 20:53:51 +0000</bug_when>
    <thetext>I can&apos;t replicate this.  Randy, can you replicate with a clean build directory and a template local.conf?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68967</commentid>
    <comment_count>3</comment_count>
    <who name="Randy Witt">randy.e.witt</who>
    <bug_when>2016-12-09 00:12:49 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; I can&apos;t replicate this.  Randy, can you replicate with a clean build
&gt; directory and a template local.conf?

Ross, I just reproduced this with a clean checkout of poky and a new build directory. I also reproduced it in a debian container.

I also tried reverting fd1b82e0bd13cfc9f35c60505b97d4cb990afff2, and it does fix it for me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69127</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-12-14 16:36:03 +0000</bug_when>
    <thetext>Merged in oe-core 3206f408e908870629eb47afac6249a3c9497a66.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69434</commentid>
    <comment_count>5</comment_count>
    <who name="David Lopez Barriba">davidx.lopez.barriba</who>
    <bug_when>2017-01-02 22:53:42 +0000</bug_when>
    <thetext>Verified in 573c646d4cc62dcd0c230381df4940bdf314d495</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>