Skip to content

Commit

Permalink
xtensa-build-zephyr.py: show symbolic links at the end
Browse files Browse the repository at this point in the history
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 <marc.herbert@intel.com>
  • Loading branch information
marc-hb committed Jan 12, 2024
1 parent b07d6e9 commit 12a8d7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,16 @@ def show_installed_files():

for pre, _, node in RenderTree(graph_root, render.AsciiStyle):
fpath = STAGING_DIR / node.long_name

symlink_trailer = f" -> {str(fpath.readlink())}" 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;
Expand Down

0 comments on commit 12a8d7f

Please sign in to comment.