[bitbake-devel] [PATCH] bitbake-worker: Add DryRun event
Mark Hatle
mark.hatle at windriver.com
Tue Oct 2 01:37:19 UTC 2018
There may be actions that a user wants to take, but the information is
only available during task execution. Using the DryRun event you can prevent
the actual task execution, but get access to the associated data stores.
Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
---
bin/bitbake-worker | 2 ++
lib/bb/event.py | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/bin/bitbake-worker b/bin/bitbake-worker
index e925054b..e27fe7ac 100755
--- a/bin/bitbake-worker
+++ b/bin/bitbake-worker
@@ -268,6 +268,8 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, append
os._exit(1)
try:
if dry_run:
+ localdata = bb.build._task_data(fn, taskname, the_data)
+ bb.event.fire(bb.event.DryRun(), localdata)
return 0
return bb.build.exec_task(fn, taskname, the_data, cfg.profile)
except:
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 5b1b094a..c03541a1 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -832,3 +832,8 @@ class FindSigInfoResult(Event):
def __init__(self, result):
Event.__init__(self)
self.result = result
+
+class DryRun(Event):
+ """
+ Event to fire during a dry run
+ """
--
2.16.0.rc2
More information about the bitbake-devel
mailing list