On Mon, 2018-08-20 at 10:54 -0500, Joshua Watt wrote:
> Replaces usage of the deprecated oe.utils.getstatusoutput() with
> Python
> subprocess calls.
> 
> Signed-off-by: Joshua Watt <jpewhac...@gmail.com>
> ---
>  meta/classes/package.bbclass | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/meta/classes/package.bbclass
> b/meta/classes/package.bbclass
> index 4ce9de2f573..3976811d19f 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -380,6 +380,7 @@ def splitdebuginfo(file, dvar, debugdir,
> debuglibdir, debugappend, debugsrcdir,
>      # sourcefile is also generated containing a list of debugsources
>  
>      import stat
> +    import subprocess
>  
>      src = file[len(dvar):]
>      dest = debuglibdir + os.path.dirname(src) + debugdir + "/" +
> os.path.basename(src) + debugappend
> @@ -409,16 +410,10 @@ def splitdebuginfo(file, dvar, debugdir,
> debuglibdir, debugappend, debugsrcdir,
>  
>      bb.utils.mkdirhier(os.path.dirname(debugfile))
>  
> -    cmd = "'%s' --only-keep-debug '%s' '%s'" % (objcopy, file, debugfile)
> -    (retval, output) = oe.utils.getstatusoutput(cmd)
> -    if retval:
> -        bb.fatal("objcopy failed with exit code %s (cmd was %s)%s" % 
> (retval, cmd, ":\n%s" % output if output else ""))
> +    subprocess.check_output([objcopy, '--only-keep-debug', file, debugfile])

Sorry, I just realised it needs a stderr=subprocess.STDOUT in there to
ensure the right things happen with logging...

Cheers,

Richard
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to