From 61c78368b732739be5ece4777fa570adf5a6c83b Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 13 Sep 2010 15:39:07 +0100 Subject: [PATCH] bitbake/build.py: Set BB_FILENAME to represent the .bb file being built (including any virtual prefix) Signed-off-by: Richard Purdie --- lib/bb/build.py | 3 ++- lib/bb/runqueue.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/bb/build.py b/lib/bb/build.py index bd3da5035d5..2e7d75bc334 100644 --- a/lib/bb/build.py +++ b/lib/bb/build.py @@ -278,7 +278,7 @@ def exec_func_shell(func, d, runfile, logfile, flags): raise FuncFailed(func, logfile) -def exec_task(task, d): +def exec_task(fn, task, d): """Execute an BB 'task' The primary difference between executing a task versus executing @@ -296,6 +296,7 @@ def exec_task(task, d): data.setVar('OVERRIDES', 'task-%s:%s' % (task[3:], old_overrides), localdata) data.update_data(localdata) data.expandKeys(localdata) + data.setVar('BB_FILENAME', fn, d) data.setVar('BB_CURRENTTASK', task[3:], d) event.fire(TaskStarted(task, localdata), localdata) exec_func(task, localdata) diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index cd3c25e4fec..01e067d5bef 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -1113,7 +1113,7 @@ class RunQueue: bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY2", fn, self.cooker.configuration.data) try: the_data = bb.cache.Cache.loadDataFull(fn, self.cooker.get_file_appends(fn), self.cooker.configuration.data) - bb.build.exec_task(taskname, the_data) + bb.build.exec_task(fn, taskname, the_data) except Exception as exc: logger.critical(str(exc)) os._exit(1) -- 2.47.3