bitbake: build.py: Fix traceback when there are no dependencies
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Jan 2013 17:35:39 +0000 (17:35 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Jan 2013 17:38:23 +0000 (17:38 +0000)
A recipe with no dependencies results in a traceback (e.g. all in
ASSUME_PROVIDED). This shouldn't happen and this patch fixes it.

(Bitbake rev: dee7decf87dfa8cb966fe40846d27f3e6ab1846b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/build.py

index 43790a6..2f6a61f 100644 (file)
@@ -591,9 +591,10 @@ def add_tasks(tasklist, d):
         getTask('noexec')
         getTask('umask')
         task_deps['parents'][task] = []
-        for dep in flags['deps']:
-            dep = data.expand(dep, d)
-            task_deps['parents'][task].append(dep)
+        if 'deps' in flags:
+            for dep in flags['deps']:
+                dep = data.expand(dep, d)
+                task_deps['parents'][task].append(dep)
 
     # don't assume holding a reference
     data.setVar('_task_deps', task_deps, d)