diff options
author | Max Kellermann <max.kellermann@gmail.com> | 2018-09-24 10:05:55 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-27 23:41:41 +0100 |
commit | 652e3ccd534ae5fa01e2318c39d4188059e55db0 (patch) | |
tree | bfba020c8db0ce674359dcc57613e88919ab7ee3 /meta/classes/kernel-yocto.bbclass | |
parent | 9f87210a98c21d6cd0ced5e7753c4a3d65e1cb13 (diff) | |
download | poky-652e3ccd534ae5fa01e2318c39d4188059e55db0.tar.gz |
kernel-yocto.bbclass: fix "referenced before assignment" error
If "scc --configs" fails, do_kernel_configcheck() crashes like this:
0338: try:
0339: configs = subprocess.check_output(['scc', '--configs', '-o', s + '/.kernel-meta'], env=env).decode('utf-8')
0340: except subprocess.CalledProcessError:
*** 0341: bb.fatal( "Cannot gather config fragments for audit: %s" % configs)
0342:
0343: try:
0344: subprocess.check_call(['kconf_check', '--report', '-o',
0345: '%s/%s/cfg' % (s, kmeta), d.getVar('B') + '/.config', s, configs], cwd=s, env=env)
Exception: UnboundLocalError: local variable 'configs' referenced before assignment
This crash bug was introduced by commit
21de5cc43cfedc703e5bc0515507a6dae36afb74
(From OE-Core rev: 9602c03e8701c972f544001415efa92877622f57)
Signed-off-by: Max Kellermann <max.kellermann@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 2ecd060093..496c8a7f68 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -337,8 +337,8 @@ python do_kernel_configcheck() { | |||
337 | 337 | ||
338 | try: | 338 | try: |
339 | configs = subprocess.check_output(['scc', '--configs', '-o', s + '/.kernel-meta'], env=env).decode('utf-8') | 339 | configs = subprocess.check_output(['scc', '--configs', '-o', s + '/.kernel-meta'], env=env).decode('utf-8') |
340 | except subprocess.CalledProcessError: | 340 | except subprocess.CalledProcessError as e: |
341 | bb.fatal( "Cannot gather config fragments for audit: %s" % configs) | 341 | bb.fatal( "Cannot gather config fragments for audit: %s" % e.output.decode("utf-8") ) |
342 | 342 | ||
343 | try: | 343 | try: |
344 | subprocess.check_call(['kconf_check', '--report', '-o', | 344 | subprocess.check_call(['kconf_check', '--report', '-o', |