bitbake: bitbake: runqueue: add warning if invalidating invalid task
authorPetter Mabäcker <petter@technux.se>
Wed, 24 Jul 2013 10:31:04 +0000 (10:31 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 Jul 2013 14:25:09 +0000 (15:25 +0100)
Add a warning if 'bitbake -C' is executed with a task that does not
exist.

Fixes [YOCTO #4877]

(Bitbake rev: 6459c1d0eb8f1007246df36149e2496ee531e25f)

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/runqueue.py

index fce08ee..b2c9703 100644 (file)
@@ -720,6 +720,9 @@ class RunQueueData:
 
         def invalidate_task(fn, taskname, error_nostamp):
             taskdep = self.dataCache.task_deps[fn]
+            fnid = self.taskData.getfn_id(fn)
+            if taskname not in taskData.tasks_lookup[fnid]:
+                logger.warn("Task %s does not exist, invalidating this task will have no effect" % taskname)
             if 'nostamp' in taskdep and taskname in taskdep['nostamp']:
                 if error_nostamp:
                     bb.fatal("Task %s is marked nostamp, cannot invalidate this task" % taskname)