You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ak...@apache.org on 2025/09/10 11:33:15 UTC
(buildstream) 06/06: _frontend: allow showing the element kind in `bst show`
This is an automated email from the ASF dual-hosted git repository.
akitouni pushed a commit to branch abderrahim/digest-environment
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 41fc596d0476d46a498551f372bd6cd5f67fd05c
Author: Abderrahim Kitouni <ab...@codethink.co.uk>
AuthorDate: Wed Sep 10 12:32:51 2025 +0100
_frontend: allow showing the element kind in `bst show`
---
src/buildstream/_frontend/cli.py | 1 +
src/buildstream/_frontend/widget.py | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py
index 9d7619bae..1ee20b9c3 100644
--- a/src/buildstream/_frontend/cli.py
+++ b/src/buildstream/_frontend/cli.py
@@ -600,6 +600,7 @@ def show(app, elements, deps, except_, order, format_):
\b
%{name} The element name
+ %{kind} The element kind (Since: 2.6)
%{description} The element description, on a single line (Since: 2.3)
%{key} The abbreviated cache key (if all sources are consistent)
%{full-key} The full cache key (if all sources are consistent)
diff --git a/src/buildstream/_frontend/widget.py b/src/buildstream/_frontend/widget.py
index e061f0c2f..9eb91cf9e 100644
--- a/src/buildstream/_frontend/widget.py
+++ b/src/buildstream/_frontend/widget.py
@@ -355,6 +355,7 @@ class LogLine(Widget):
description = " ".join(element._description.splitlines())
line = p.fmt_subst(line, "name", element._get_full_name(), fg="blue", bold=True)
+ line = p.fmt_subst(line, "kind", element.get_kind(), fg="blue", bold=True)
line = p.fmt_subst(line, "key", key.brief, fg="yellow", dim=dim_keys)
line = p.fmt_subst(line, "full-key", key.full, fg="yellow", dim=dim_keys)
line = p.fmt_subst(line, "description", description, fg="yellow", dim=dim_keys)