Bug 1091 - Adding .bbappend should invalidate cache
Summary: Adding .bbappend should invalidate cache
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.0
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.1 M2
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-05-20 04:32 UTC by Gary Thomas
Modified: 2014-01-28 12:06 UTC (History)
5 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 Gary Thomas 2011-05-20 04:32:41 UTC
Here's the scenario - one builds a package, then finds that it's inadequate
for the [local] requirements.  A change needs to be made, but not one which
warrants changing the global recipe.  So, a .bbappend file is created in the
local layer, affecting the change.

Sadly, in this case, the .bbappend file will not be processed because the
recipe has already been parsed and cached and only that data will be used.
Somehow, the cache logic should take into account all parts of the recipe
and if that changes, e.g. a .bbappend gets added, the cache is invalid.

There might be some more elegant way to solve this, but my experience is
that forcing the cache to be rebuilt solves the problem and allows the
.bbappend file to operate.
Comment 2 Tom Walsh 2013-12-31 16:53:11 UTC
This seems to be another consequence of this bug: when a new bbappend recipe is added to a working image (rootfs has been previously generated), the associated RPM is rebuilt, but the rebuild of the rootfs is not triggered (you have to do a bitbake -c clean <image> before the change is propagated from the RPM into the rootfs).

Here is an example, build an image using ext3 as the output and make the system rpm based.  Then, add a "<machine>/meta/recipes/recipes-core/netbase/netbase_5.1.bbappend" containing the following:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PRINC := "${@int(PRINC) + 3}"


Add a hosts file into "<machine>/meta/recipes/recipes-core/netbase/files/" and build the image (e.g. bitbake core-image-*).  The bbappend is processed, an RPM with the correct contents is produced, but the rootfs image is not updated.

Subsequent attempts to build the image will ignore the new change until a clean is done of the rootfs image.
Comment 3 Richard Purdie 2014-01-28 12:06:39 UTC
I'm pretty sure you're running into http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/lib/oe/sstatesig.py?id=80d522a5bc694fdb8b8a53ad4aa36410f3612c6b and this has been resolved. 

In future please open new bugs for new issues like this, its a different issue to the one described here which was fixed 2.5 years ago.