On Wed, Dec 15, 2010 at 4:09 PM, Graham Gower <[email protected]> wrote:
> os.waitpid returns an error code in the high byte of this 16 bit value.
>
> Fixes error messages returning codes such as
> ERROR: Task 3383 
> (/storage/oe/testbuilder/openembedded/recipes/kexec-tools/kexec-tools-klibc_2.0.2.bb,
>  do_compile) failed with exit code '256'
>
> Signed-off-by: Graham Gower <[email protected]>
> ---
>  lib/bb/runqueue.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
> index f84d9aa..50ea5ea 100644
> --- a/lib/bb/runqueue.py
> +++ b/lib/bb/runqueue.py
> @@ -938,7 +938,7 @@ class RunQueueExecute:
>         self.build_pipes[result[0]].close()
>         del self.build_pipes[result[0]]
>         if result[1] != 0:
> -            self.task_fail(task, result[1])
> +            self.task_fail(task, (result[1]>>8)&0xf)


hmmm how about using try except you can also use strerror and errno to
deliver a better diagnostic what went wrong.

try:
      pid, status = os.waitpid(-1, os.WNOHANG)
      .....
      break
except OSError, (errno, strerror):
      .....


>         else:
>             self.task_complete(task)
>             self.stats.taskCompleted()
> --
> 1.7.1
>
> _______________________________________________
> Bitbake-dev mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/bitbake-dev
>
_______________________________________________
Bitbake-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bitbake-dev

Reply via email to