Patchwork [bitbake-devel] lib/bb/build.py: 'deps' may not always exist in a few corner cases.

login
register
mail settings
Submitter Mark Hatle
Date Jan. 7, 2013, 5:57 p.m.
Message ID <1357581443-27929-1-git-send-email-mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/42247/
State Accepted
Commit dee7decf87dfa8cb966fe40846d27f3e6ab1846b
Headers show

Comments

Mark Hatle - Jan. 7, 2013, 5:57 p.m.
With a small set of recipes (1), and all system dependencies assume_provided,
we may end up with no parent dependencies.  So we check if 'deps' was defined
instead of always assuming it exists.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 lib/bb/build.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
Bernhard Reutner-Fischer - Jan. 9, 2013, 7:30 a.m.
On 7 January 2013 18:57:23 Mark Hatle <mark.hatle@windriver.com> wrote:
> With a small set of recipes (1), and all system dependencies assume_provided,
> we may end up with no parent dependencies.  So we check if 'deps' was defined
> instead of always assuming it exists.
>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
>  lib/bb/build.py |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/lib/bb/build.py b/lib/bb/build.py
> index 43790a6..2f6a61f 100644
> --- a/lib/bb/build.py
> +++ b/lib/bb/build.py
> @@ -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']:

for dep in flags.get('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)


Sent with AquaMail for Android
http://www.aqua-mail.com

Patch

diff --git a/lib/bb/build.py b/lib/bb/build.py
index 43790a6..2f6a61f 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -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)