Bug 2615

Summary: Add a new flag to bitbake -C to clear a stamp and run the default target
Product: [Build System, Metadata & Runtime] BitBake Reporter: Jason Wessel <jason.wessel>
Component: bitbakeAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: laurentiu.serban, poky.bs.watcher, poky.watcher, sgw, song.liu
Version: unspecified   
Target Milestone: 1.3 M2   
Hardware: All   
OS: Multiple   
Whiteboard: (p1)(fixed)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jason Wessel 2012-06-17 11:46:25 UTC
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.
Comment 1 Paul Eggleton 2012-06-18 12:42:37 UTC
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.
Comment 2 Paul Eggleton 2012-06-18 16:30:54 UTC
I've sent out a patch series for review to the bitbake-devel list for this.
Comment 3 Paul Eggleton 2012-06-25 16:31:48 UTC
Implementation merged to master in commits 5bd11a9bf329217f312076f347b045b5c09f19b2 and c072fa8400002326027557c454a0563acc9ea3b1, with a slight tweak to the help text in 25441f47caadeb66a98ec4317211430772b3e5cf.
Comment 4 Laurentiu Serban 2012-07-11 21:22:52 UTC
Verified
bitbake -C compile recipe
can be used instead of 
bitbake -c compile -f recipe
&& bitbake recipe