[OE-core] [PATCH] classes/kernel-yocto: Cleanup getstatusoutput usage
Burton, Ross
ross.burton at intel.com
Wed Jul 25 19:50:28 UTC 2018
On 25 July 2018 at 19:35, Joshua Watt <jpewhacker at gmail.com> wrote:
> - 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))
> + try:
> + configs = subprocess.check_output(['scc', '--configs', '-o', s + '/.kernel-meta'], env=env).decode('utf-8')
> + except subprocess.CalledProcessError:
> + # Is this really non-fatal?
> + pass
> +
> + try:
> + subprocess.check_call(['kconf_check', '--report', '-o',
> + '%s/%s/cfg' % (s, kmeta), d.getVar('B') + '/.config', s, configs], cwd=s, env=env)
> + except subprocess.CalledProcessError:
> + # Is this really non-fatal?
> + pass
CCing Bruce for his feedback. Either one or both of these calls can
fail without it being fatal which should be documented, or it
shouldn't be catching the exceptions.
Ross
More information about the Openembedded-core
mailing list