Patchwork [2/4] lib/oelite/baker: catch EXTRA_ARCH expansion error and add recipe name to print

login
register
mail settings
Submitter Morten Svendsen
Date Oct. 5, 2012, 9:51 a.m.
Message ID <d395d8f839d34f673815c513df83e62af7f0638c.1349430062.git.morten.thunbergsvendsen@prevas.dk>
Download mbox | patch
Permalink /patch/189452/
State Accepted
Delegated to: Esben Haabendal
Headers show

Comments

Morten Svendsen - Oct. 5, 2012, 9:51 a.m.
---
 lib/oelite/baker.py |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Esben Haabendal - Oct. 5, 2012, 3:16 p.m.
Morten Thunberg Svendsen <morten.thunbergsvendsen@prevas.dk> writes:

> ---
>  lib/oelite/baker.py |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/lib/oelite/baker.py b/lib/oelite/baker.py
> index aa48a30..55f14be 100644
> --- a/lib/oelite/baker.py
> +++ b/lib/oelite/baker.py
> @@ -331,7 +331,11 @@ class OEliteBaker:
>              dephashes = {}
>              for depend in self.runq.task_dependencies(task, flatten=True):
>                  dephashes[depend] = self.runq.get_task_metahash(depend)
> -            recipe_extra_arch = recipe.meta.get("EXTRA_ARCH")
> +            try:
> +                recipe_extra_arch = recipe.meta.get("EXTRA_ARCH")
> +            except oelite.meta.ExpansionError as e:
> +                e.msg += " in %s"%(task)
> +                raise
>              task_meta = task.meta()
>              if (recipe_extra_arch and
>                  task_meta.get("EXTRA_ARCH") != recipe_extra_arch):

Merged to master, 3.1 and 3.0 branches.

/Esben

Patch

diff --git a/lib/oelite/baker.py b/lib/oelite/baker.py
index aa48a30..55f14be 100644
--- a/lib/oelite/baker.py
+++ b/lib/oelite/baker.py
@@ -331,7 +331,11 @@  class OEliteBaker:
             dephashes = {}
             for depend in self.runq.task_dependencies(task, flatten=True):
                 dephashes[depend] = self.runq.get_task_metahash(depend)
-            recipe_extra_arch = recipe.meta.get("EXTRA_ARCH")
+            try:
+                recipe_extra_arch = recipe.meta.get("EXTRA_ARCH")
+            except oelite.meta.ExpansionError as e:
+                e.msg += " in %s"%(task)
+                raise
             task_meta = task.meta()
             if (recipe_extra_arch and
                 task_meta.get("EXTRA_ARCH") != recipe_extra_arch):