[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: [OE-core] [PATCH 3/3] kernel-yocto: improve fatal error messages of symbol_why.py
From: "Jose Quaresma" <quaresma.jose () gmail ! com>
Date: 2022-09-30 17:54:40
Message-ID: 20220930175440.2168008-3-jose.quaresma () foundries ! io
[Download RAW message or body]
Content-Transfer-Encoding: 8bit
Improve the fatal error message of the yocto-kernel-tools symbol_why.py
and shows the command that generate the error as it can help understand
the root cause of the error.
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
meta/classes-recipe/kernel-yocto.bbclass | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/meta/classes-recipe/kernel-yocto.bbclass \
b/meta/classes-recipe/kernel-yocto.bbclass index 8eda0dcaf3..46df9b23dc 100644
--- a/meta/classes-recipe/kernel-yocto.bbclass
+++ b/meta/classes-recipe/kernel-yocto.bbclass
@@ -573,9 +573,10 @@ python do_kernel_configcheck() {
# category #1: mismatches
try:
- analysis = subprocess.check_output(['symbol_why.py', '--dotconfig', \
'{}'.format( d.getVar('B') + '/.config' ), '--mismatches', extra_params], cwd=s, \
env=env ).decode('utf-8') + cmd = ['symbol_why.py', '--dotconfig', \
'{}'.format( d.getVar('B') + '/.config' ), '--mismatches', extra_params] + \
analysis = subprocess.check_output(cmd, cwd=s, env=env ).decode('utf-8') except \
subprocess.CalledProcessError as e:
- bb.fatal( "config analysis failed: %s" % e.output.decode('utf-8'))
+ bb.fatal( "config analysis failed when running '%s': %s" % (" ".join(cmd), \
e.output.decode('utf-8')))
if analysis:
outfile = "{}/{}/cfg/mismatch.txt".format( s, kmeta )
@@ -595,9 +596,10 @@ python do_kernel_configcheck() {
if bsp_check_visibility > 1:
extra_params = "--strict"
try:
- analysis = subprocess.check_output(['symbol_why.py', '--dotconfig', \
'{}'.format( d.getVar('B') + '/.config' ), '--invalid', extra_params], cwd=s, env=env \
).decode('utf-8') + cmd = ['symbol_why.py', '--dotconfig', '{}'.format( \
d.getVar('B') + '/.config' ), '--invalid', extra_params] + analysis = \
subprocess.check_output(cmd, cwd=s, env=env ).decode('utf-8') except \
subprocess.CalledProcessError as e:
- bb.fatal( "config analysis failed: %s" % e.output.decode('utf-8'))
+ bb.fatal( "config analysis failed when running '%s': %s" % (" ".join(cmd), \
e.output.decode('utf-8')))
if analysis:
outfile = "{}/{}/cfg/invalid.txt".format(s,kmeta)
@@ -614,9 +616,10 @@ python do_kernel_configcheck() {
# category #3: redefined options (this is pretty verbose and is debug only)
try:
- analysis = subprocess.check_output(['symbol_why.py', '--dotconfig', \
'{}'.format( d.getVar('B') + '/.config' ), '--sanity'], cwd=s, env=env \
).decode('utf-8') + cmd = ['symbol_why.py', '--dotconfig', '{}'.format( \
d.getVar('B') + '/.config' ), '--sanity'] + analysis = \
subprocess.check_output(cmd, cwd=s, env=env ).decode('utf-8') except \
subprocess.CalledProcessError as e:
- bb.fatal( "config analysis failed: %s" % e.output.decode('utf-8'))
+ bb.fatal( "config analysis failed when running '%s': %s" % (" ".join(cmd), \
e.output.decode('utf-8')))
if analysis:
outfile = "{}/{}/cfg/redefinition.txt".format(s,kmeta)
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#171235): https://lists.openembedded.org/g/openembedded-core/message/171235
Mute This Topic: https://lists.openembedded.org/mt/94022666/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic