[Buildroot] [autobuild 1/4] autobuild-run: prevent send_result from failing when gathering config files

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sun Apr 12 17:20:51 UTC 2015


Dear Samuel Martin,

On Sun, 12 Apr 2015 16:34:42 +0200, Samuel Martin wrote:
> - Make sure using absolute paths in os.path.relpath();
> - os.makedirs() can fail if the directory already exists, so only create it
>   when needed.
> 
> Signed-off-by: Samuel Martin <s.martin49 at gmail.com>
> ---
>  scripts/autobuild-run | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/autobuild-run b/scripts/autobuild-run
> index 0e12080..a19d51b 100755
> --- a/scripts/autobuild-run
> +++ b/scripts/autobuild-run
> @@ -653,15 +653,16 @@ def send_results(result, **kwargs):
>          if not reason:
>              return
>  
> -        srcroot = os.path.join(outputdir, "build", '-'.join(reason))
> -        destroot = os.path.join(resultdir, '-'.join(reason))
> +        srcroot = os.path.abspath(os.path.join(outputdir, "build", '-'.join(reason)))
> +        destroot = os.path.abspath(os.path.join(resultdir, '-'.join(reason)))

Can you explain why this is needed?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list