From c8eb21621a11ee78c8a8ca40754b04a5fd0d2f89 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 12 Jan 2024 23:26:05 +0000 Subject: [PATCH] xtensa-build-zephyr.py: show symbolic links at the end Not sure why I thought it would be complicated; I should have done this much sooner. Before: ``` build-sof-staging |-- sof | +-- intel | +-- sof-ipc4 | |-- adl | | +-- community | | +-- sof-adl.ri | |-- adl-n | | +-- community | | +-- sof-adl-n.ri | |-- arl | | +-- community | | +-- sof-arl.ri ``` After: ``` build-sof-staging |-- sof | +-- intel | +-- sof-ipc4 | |-- adl | | +-- community | | +-- sof-adl.ri -> ../../tgl/community/sof-tgl.ri | |-- adl-n | | +-- community | | +-- sof-adl-n.ri -> ../../tgl/community/sof-tgl.ri | |-- arl | | +-- community | | +-- sof-arl.ri -> ../../mtl/community/sof-mtl.ri ``` Signed-off-by: Marc Herbert --- scripts/xtensa-build-zephyr.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/xtensa-build-zephyr.py b/scripts/xtensa-build-zephyr.py index 467e132ec52e..2670ab9b15c0 100755 --- a/scripts/xtensa-build-zephyr.py +++ b/scripts/xtensa-build-zephyr.py @@ -378,13 +378,17 @@ def show_installed_files(): for pre, _, node in RenderTree(graph_root, render.AsciiStyle): fpath = STAGING_DIR / node.long_name + + # pathLib.readlink() requires Python 3.9 + symlink_trailer = f" -> {os.readlink(fpath)}" if fpath.is_symlink() else "" + stem = node.name[:-3] if node.name.endswith(".gz") else node.name shasum_trailer = "" if checksum_wanted(stem) and fpath.is_file() and not fpath.is_symlink(): shasum_trailer = "\tsha256=" + checksum(fpath) - print(f"{pre}{node.name} {shasum_trailer}") + print(f"{pre}{node.name} {symlink_trailer} {shasum_trailer}") # TODO: among other things in this file it should be less SOF-specific;