[OE-core] [PATCH 3/5] kernel-yocto.bbclass: Clean up getstatusoutput usage

Bruce Ashfield bruce.ashfield at gmail.com
Thu Aug 23 12:18:58 UTC 2018


ignore this patch. I already have a more complete version that was
sent previously and is in my queue I'll send later today.

Bruce

On Thu, Aug 23, 2018 at 4:07 AM, Robert Yang <liezhi.yang at windriver.com> wrote:
> Replace usage of oe.utils.getstatusoutput() with direct subprocess calls.
>
> Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
> ---
>  meta/classes/kernel-yocto.bbclass | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
> index 077a1ab..8c5667d 100644
> --- a/meta/classes/kernel-yocto.bbclass
> +++ b/meta/classes/kernel-yocto.bbclass
> @@ -322,6 +322,7 @@ addtask kernel_configme before do_configure after do_patch
>
>  python do_kernel_configcheck() {
>      import re, string, sys
> +    import subprocess
>
>      # if KMETA isn't set globally by a recipe using this routine, we need to
>      # set the default to 'meta'. Otherwise, kconf_check is not passed a valid
> @@ -333,10 +334,10 @@ python do_kernel_configcheck() {
>      pathprefix = "export PATH=%s:%s; " % (d.getVar('PATH'), "${S}/scripts/util/")
>
>      cmd = d.expand("scc --configs -o ${S}/.kernel-meta")
> -    ret, configs = oe.utils.getstatusoutput("%s%s" % (pathprefix, cmd))
> +    configs = subprocess.getoutput("%s%s" % (pathprefix, cmd))
>
>      cmd = d.expand("cd ${S}; kconf_check --report -o ${S}/%s/cfg/ ${B}/.config ${S} %s" % (kmeta,configs))
> -    ret, result = oe.utils.getstatusoutput("%s%s" % (pathprefix, cmd))
> +    result = subprocess.getoutput("%s%s" % (pathprefix, cmd))
>
>      config_check_visibility = int(d.getVar("KCONF_AUDIT_LEVEL") or 0)
>      bsp_check_visibility = int(d.getVar("KCONF_BSP_AUDIT_LEVEL") or 0)
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"



More information about the Openembedded-core mailing list