bitbake: allow -C to accept recipe1:task1,recipe2:task2
RFC PATCH 1/1 bitbake: allow -C to accept recipe1:task1,recipe2:task2
Previously a command such as:
bitbake -C fetch recipe1 recipe2
would invalidate fetch in both recipe1 and recipe2 before executing the default task in both recipes. Finer control may be desired in some situations.
With this change, a new format is accepted:
bitbake -C recipe1:fetch recipe1 recipe2
which invalidates fetch only in recipe1 than executes default task in both recipe1 and recipe2. Only tasks in recipes presented in the list are invalidated.
bitbake -C recipe3:fetch recipe1 recipe2
would not invalidate anything before executing recipe1 and recipe2. This behavior is up for debate.
--- doc/bitbake-user-manual/bitbake-user-manual-intro.rst | 9 ++++++--- lib/bb/runqueue.py | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-)
doc/bitbake-user-manual/bitbake-user-manual-intro.rst +6 -3
@@ -373,9 +373,12 @@ Following is the usage and syntax for BitBake:: be 'compile' or 'populate_sysroot' or 'listtasks' may give a list of the tasks available. -C INVALIDATE_STAMP, --clear-stamp=INVALIDATE_STAMP - Invalidate the stamp for the specified task such as - 'compile' and then run the default task for the - specified target(s). + Invalidate the stamp for the specified taski(s) such + as 'compile' and then run the default task for the + specified target(s). A comma-separated task list is + accepted. The tasks will be invalidated on all the + targets, unless the tasks are specified as + target:task. -r PREFILE, --read=PREFILE Read the specified file before bitbake.conf. -R POSTFILE, --postread=POSTFILE
lib/bb/runqueue.py +5 -0
@@ -1251,6 +1251,11 @@ class RunQueueData: for tid in self.target_tids: fn = fn_from_tid(tid) for st in self.cooker.configuration.invalidate_stamp.split(','): + if st.find(":") > 0: + st_split = st.split(":"); + st = st_split[1] + if fn.find(st_split[0]) < 0: + continue if not st.startswith("do_"): st = "do_%s" % st invalidate_task(fn + ":" + st, True)
Signature · 1 line
2.46.0