Bitbake needs a flag which will allow you to clear a stamp and run the default target, such that you an compile and repackage a recipe in one step, or that you can compile a specific task and fully repackage an image. This is used predominately for an incremental work flow of working on a package before you finalize changes and bump a pr number. Example 1: Test some local changes with the acl package * Get sources with: bitbake -c configure acl * Make some changes to the sources in the working tmp/... directory * Now recompile/repackage acl: bitbake -C compile acl Example 2: Test some local changes with the acl package in an image * Get sources with: bitbake -c configure acl * Make some changes to the sources in the working tmp/... directory * Now recompile/repackage acl: bitbake -C compile acl core-image-sato Even without this change, there is a problem with bitbake that also needs to be fixed where you cannot force a compile and have a package get repackaged and put in the final image if it had successfully re-built. This work flow should also work properly: bitbake acl # Make changes locally to acl bitbake -f -c acl bitbake acl The problem is that the depending stamps are only existence checked and not "time dependent checked". In this case the do_package stamp is older than the do_compile stamp for acl. Implementation wise, it would probably be cheaper to just clear all dependent stamps in a package if using "bitbake -f -c" or "bitbake -C", vs having full time stamp checking.
FYI I'm working on this right now, using a signature-based solution which is working pretty well. I just have a few minor things to tidy up, fingers crossed should be finished by the end of the day.
I've sent out a patch series for review to the bitbake-devel list for this.
Implementation merged to master in commits 5bd11a9bf329217f312076f347b045b5c09f19b2 and c072fa8400002326027557c454a0563acc9ea3b1, with a slight tweak to the help text in 25441f47caadeb66a98ec4317211430772b3e5cf.
Verified bitbake -C compile recipe can be used instead of bitbake -c compile -f recipe && bitbake recipe