Patchwork [bitbake-devel,2/2] bitbake/runqueue: make dry-run do everything except execute

login
register
mail settings
Submitter Paul Eggleton
Date Feb. 27, 2012, 6:54 p.m.
Message ID <5c4747691670e22e1b707a615e9c6f796387161d.1330368761.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/22147/
State New
Headers show

Comments

Paul Eggleton - Feb. 27, 2012, 6:54 p.m.
Make dry-run do everything except executing the task, instead of
cutting it off earlier. This fully tests the code path for running the
child task (parsing and fakeroot), as well as enabling future
functionality such as using dry-run to produce signature files.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/lib/bb/runqueue.py |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

Patch

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 0652c49..d4b2cd4 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1187,7 +1187,8 @@  class RunQueueExecute:
                     logger.critical(str(exc))
                 os._exit(1)
             try:
-                ret = bb.build.exec_task(fn, taskname, the_data)
+                if not self.cooker.configuration.dry_run:
+                    ret = bb.build.exec_task(fn, taskname, the_data)
                 os._exit(ret)
             except:
                 os._exit(1)
@@ -1370,12 +1371,6 @@  class RunQueueExecuteTasks(RunQueueExecute):
                                 self.rqdata.get_user_idstring(task))
                 self.task_skip(task)
                 return True
-            elif self.cooker.configuration.dry_run:
-                self.runq_running[task] = 1
-                self.runq_buildable[task] = 1
-                self.stats.taskActive()
-                self.task_complete(task)
-                return True
 
             taskdep = self.rqdata.dataCache.task_deps[fn]
             if 'noexec' in taskdep and taskname in taskdep['noexec']: