Bug 9784 - Building with -c rootfs fails if toaster and buildhistory are inherited
Summary: Building with -c rootfs fails if toaster and buildhistory are inherited
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.2 M2
Assignee: Elliot Smith
QA Contact: Jose Perez C
URL:
Whiteboard:
Depends on: 8556
Blocks: 9856 9893
  Show dependency tree
 
Reported: 2016-06-16 12:54 UTC by Peter Kjellerstedt
Modified: 2016-08-12 20:00 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Kjellerstedt 2016-06-16 12:54:56 UTC
If one inherits toaster and buildhistory and the build an image with -c rootfs (without having built an image before), the build fails. This is because the code in toaster.bbclass assumes that buildhistory/images/${MACHINE_ARCH}/${TCLIBC}/<target> (if it exists) contains a files-in-image.txt file. This, however, is not true until an image has been created, but the directory exists already after rootfs has been created.

Another consequence of this is that if one first builds an image, then do some changes, and then build only the rootfs, toaster.bbclass will still find the old files-in-image.txt file from the previous image...

Steps to reproduce:
* git clone http://git.yoctoproject.org/git/poky poky
* cd poky
* . ./oe-init-build-env
* echo 'INHERIT += "buildhistory toaster"' >>conf/local.conf
* echo 'BUILDHISTORY_COMMIT = "1"' >>conf/local.conf
* bitbake core-image-minimal -c rootfs
Comment 1 Elliot Smith 2016-06-22 08:13:54 UTC
After discussion, the solution may be to link creation of files-in-image.txt to do_rootfs. This should ensure that the file is updated whenever rootfs runs (which is when the list of files in files-in-image.txt changes).
Comment 2 Elliot Smith 2016-06-30 11:10:54 UTC
Depends on bug 8556, as that reworks toaster.bbclass and buildinfohelper significantly. Any work done here will clash with those changes, so wait until fixes for bug 8556 are in before approaching this.
Comment 3 Elliot Smith 2016-07-14 09:06:34 UTC
Submitted as part of the patchset for 8556:
https://lists.yoctoproject.org/pipermail/toaster/2016-June/004899.html

The commit which is relevant here is:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=elliot/toaster/8556-image_fstypes&id=2db715753e81eb5a25e30a040ade190b383b7c79

Brian is currently in the process of upstreaming this.
Comment 4 Jose Perez C 2016-08-12 20:00:16 UTC
Verified on master commit : 6b66e9317f4ec3a69f98f29836aafa35b52f3fc7