From: Peter Kjellerstedt <pkj@axis.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] toaster.bbclass: Support layers that are not Git repositories
Date: Wed, 17 Jun 2026 11:40:37 +0200 [thread overview]
Message-ID: <20260617094037.104230-1-pkj@axis.com> (raw)
Not all layers are Git repositories, e.g., the workspace layer created
by devtool.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/classes/toaster.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index 5878230062..f6a6f87de5 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -32,12 +32,12 @@ python toaster_layerinfo_dumpdata() {
import subprocess
def _get_git_branch(layer_path):
- branch = subprocess.check_output(['git', 'symbolic-ref', 'HEAD'], cwd=layer_path, text=True).strip()
+ branch = subprocess.run(['git', 'symbolic-ref', 'HEAD'], cwd=layer_path, text=True, stdout=subprocess.PIPE).stdout.strip()
branch = branch.replace('refs/heads/', '').rstrip()
return branch
def _get_git_revision(layer_path):
- revision = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=layer_path, text=True).strip()
+ revision = subprocess.run(['git', 'rev-parse', 'HEAD'], cwd=layer_path, text=True, stdout=subprocess.PIPE).stdout.strip()
return revision
def _get_url_map_name(layer_name):
reply other threads:[~2026-06-17 9:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260617094037.104230-1-pkj@axis.com \
--to=pkj@axis.com \
--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