summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2025-10-07 14:46:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-10-09 10:58:07 +0100
commitcb2567ad96591255ed987734b8131809efae09d3 (patch)
treeb2948d817c75ae76680c483fa03104a2a933f760
parent8bd63e170c95b60cab100b77d13d7c5dca7fd088 (diff)
downloadpoky-cb2567ad96591255ed987734b8131809efae09d3.tar.gz
runqemu: ensure that bitbake environment is either returned, or an exception is raised
This eliminates the other remaining code path where environment getter returns 'nothing'. This and the previous patch were tested in a-full, and no errors occurred [1], which means the code paths that make use of the function returning nothing are never actually executed and can be cleaned up (in the following patch). The rationale is that if environment getter cannot obtain the environment, it should report that and not sweep the issue under the carpet; it's up to the caller to handle that situation, or make pre-emptive checks that avoid calling the environment getter when it is bound to fail. [1] https://lists.openembedded.org/g/openembedded-core/message/223651 (From OE-Core rev: 8197be4dd336be2f8a646916223922da61c5b9b1) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/runqemu6
1 files changed, 1 insertions, 5 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 32c7a2aab3..ed1350a728 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1744,11 +1744,7 @@ to your build configuration.
1744 cmd = 'MACHINE=%s bitbake -e %s %s' % (mach, multiconfig, target) 1744 cmd = 'MACHINE=%s bitbake -e %s %s' % (mach, multiconfig, target)
1745 else: 1745 else:
1746 cmd = 'bitbake -e %s %s' % (multiconfig, target) 1746 cmd = 'bitbake -e %s %s' % (multiconfig, target)
1747 try: 1747 return subprocess.check_output(cmd, shell=True).decode('utf-8')
1748 return subprocess.check_output(cmd, shell=True).decode('utf-8')
1749 except subprocess.CalledProcessError as err:
1750 logger.warning("Couldn't run '%s' to gather environment information, giving up with 'bitbake -e':\n%s" % (cmd, err.output.decode('utf-8')))
1751 return ''
1752 1748
1753 1749
1754 def load_bitbake_env(self, mach=None, target=None): 1750 def load_bitbake_env(self, mach=None, target=None):