You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/02/10 09:00:50 UTC
[buildstream] 02/04: _frontend/widget.py: Format full element names
in `bst show --format %{deps}`
This is an automated email from the ASF dual-hosted git repository.
tvb pushed a commit to branch tristan/user-config-docs
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 75213487a1168f7e6c8c625cd3d516132c17771d
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Wed Feb 10 17:28:02 2021 +0900
_frontend/widget.py: Format full element names in `bst show --format %{deps}`
We live in a junction aware world, let's not accidentally print out simple
element names for dependencies which might live across junction boundaries.
---
src/buildstream/_frontend/widget.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/buildstream/_frontend/widget.py b/src/buildstream/_frontend/widget.py
index d4ae6ab..99c9f42 100644
--- a/src/buildstream/_frontend/widget.py
+++ b/src/buildstream/_frontend/widget.py
@@ -418,17 +418,17 @@ class LogLine(Widget):
# Dependencies
if "%{deps" in format_:
- deps = [e.name for e in element._dependencies(_Scope.ALL, recurse=False)]
+ deps = [e._get_full_name() for e in element._dependencies(_Scope.ALL, recurse=False)]
line = p.fmt_subst(line, "deps", yaml.safe_dump(deps, default_style=None).rstrip("\n"))
# Build Dependencies
if "%{build-deps" in format_:
- build_deps = [e.name for e in element._dependencies(_Scope.BUILD, recurse=False)]
+ build_deps = [e._get_full_name() for e in element._dependencies(_Scope.BUILD, recurse=False)]
line = p.fmt_subst(line, "build-deps", yaml.safe_dump(build_deps, default_style=False).rstrip("\n"))
# Runtime Dependencies
if "%{runtime-deps" in format_:
- runtime_deps = [e.name for e in element._dependencies(_Scope.RUN, recurse=False)]
+ runtime_deps = [e._get_full_name() for e in element._dependencies(_Scope.RUN, recurse=False)]
line = p.fmt_subst(
line, "runtime-deps", yaml.safe_dump(runtime_deps, default_style=False).rstrip("\n")
)