Bug 10758

Summary: rm_work causes subsequent image builds to fail
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Randy Witt <randy.e.witt>
Component: coreAssignee: Ross Burton <ross.burton>
Status: VERIFIED FIXED QA Contact: David Lopez Barriba <davidx.lopez.barriba>
Severity: normal    
Priority: High CC: jose.perez.carranza, meta.mr.watcher, meta.watcher
Version: 2.2   
Target Milestone: 2.3 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Randy Witt 2016-12-02 00:04:53 UTC
On master:9e63f81c78e284c9b325fe04a1b59e61c7ad8a1a this problem occurs. git bisect says that it started with commit fd1b82e0bd13cfc9f35c60505b97d4cb990afff2.


Steps to reproduce:

1. Add INHERIT += "rm_work" 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 '/home/rewitt/builds/poky-builds/test/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs': No such file or directory
| Size before prelinking .
| cp: cannot create regular file '/home/rewitt/builds/poky-builds/test/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/prelink.conf': 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 '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'
| 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 '1'
NOTE: Tasks Summary: Attempted 2217 tasks of which 2215 didn'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.
Comment 1 Markus Lehtonen 2016-12-08 16:02:04 UTC
*** Bug 10770 has been marked as a duplicate of this bug. ***
Comment 2 Ross Burton 2016-12-08 20:53:51 UTC
I can't replicate this.  Randy, can you replicate with a clean build directory and a template local.conf?
Comment 3 Randy Witt 2016-12-09 00:12:49 UTC
(In reply to comment #2)
> I can't replicate this.  Randy, can you replicate with a clean build
> 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.
Comment 4 Ross Burton 2016-12-14 16:36:03 UTC
Merged in oe-core 3206f408e908870629eb47afac6249a3c9497a66.
Comment 5 David Lopez Barriba 2017-01-02 22:53:42 UTC
Verified in 573c646d4cc62dcd0c230381df4940bdf314d495