From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: [PATCH 2/3] runqemu: ensure that bitbake environment is either returned, or an exception is raised
Date: Tue, 7 Oct 2025 14:46:51 +0200 [thread overview]
Message-ID: <20251007124652.259629-2-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20251007124652.259629-1-alex.kanavin@gmail.com>
From: Alexander Kanavin <alex@linutronix.de>
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
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
scripts/runqemu | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index c28980e6163..1e8406e1194 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1745,11 +1745,7 @@ to your build configuration.
cmd = 'MACHINE=%s bitbake -e %s %s' % (mach, multiconfig, target)
else:
cmd = 'bitbake -e %s %s' % (multiconfig, target)
- try:
- return subprocess.check_output(cmd, shell=True).decode('utf-8')
- except subprocess.CalledProcessError as err:
- logger.warning("Couldn't run '%s' to gather environment information, giving up with 'bitbake -e':\n%s" % (cmd, err.output.decode('utf-8')))
- return ''
+ return subprocess.check_output(cmd, shell=True).decode('utf-8')
def load_bitbake_env(self, mach=None, target=None):
--
2.39.5
next prev parent reply other threads:[~2025-10-07 12:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 12:46 [PATCH 1/3] scripts/runqemu: raise an error when bitbake was not found Alexander Kanavin
2025-10-07 12:46 ` Alexander Kanavin [this message]
2025-10-07 12:46 ` [PATCH 3/3] scripts/runqemu: remove the code block that works around the missing bitbake environment Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251007124652.259629-2-alex.kanavin@gmail.com \
--to=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox