Skip to content

Commit afce0ec

Browse files
apps build will now no longer package vcpkg .so's that already exist in scifi-headstage-shared-libraries into the resulting app .deb as that blocks installations of scifi-headstage-shared-libraries. additionally, tap names will now wrap instead of truncate in the rich UI
1 parent 837965a commit afce0ec

2 files changed

Lines changed: 31 additions & 7 deletions

File tree

synapse/cli/build.py

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,33 @@ def build_deb_package(app_dir: str, app_name: str, version: str = "0.1.0") -> bo
354354
f"[yellow]Extracting SDK libraries from Docker image [bold]{image_tag}[/bold]...[/yellow]"
355355
)
356356

357-
# Extract SDK shared libraries → /opt/scifi/lib/
358-
# Includes libsynapse-app-sdk and its runtime dependency libonnxruntime
357+
# Skip vcpkg .so files already shipped by scifi-headstage-shared-libraries
358+
# to avoid dpkg file-overwrite conflicts when the app deb is installed.
359+
extract_script = r"""
360+
set -e
361+
filter=/tmp/scifi_shared_libs.txt
362+
: > "$filter"
363+
if dpkg-query -W -f='${Status}' scifi-headstage-shared-libraries 2>/dev/null | grep -q "install ok installed"; then
364+
dpkg-query -L scifi-headstage-shared-libraries | grep -oE '[^/]+\.so[^/]*$' | sort -u > "$filter" || true
365+
else
366+
echo "WARNING: scifi-headstage-shared-libraries not installed in build image; packaging all vcpkg .so files (may conflict on device)" >&2
367+
fi
368+
369+
find /usr/lib -maxdepth 1 -name 'libsynapse*.so*' -exec cp -a {} /out/ \;
370+
371+
vcpkg_lib="${VCPKG_ROOT}/build/host/vcpkg_installed/arm64-linux-dynamic-release/lib"
372+
if [ -d "$vcpkg_lib" ]; then
373+
find "$vcpkg_lib" -maxdepth 1 -name '*.so*' -print0 | while IFS= read -r -d '' f; do
374+
base=$(basename "$f")
375+
if [ -s "$filter" ] && grep -qxF "$base" "$filter"; then
376+
echo "Skipping $base (already shipped by scifi-headstage-shared-libraries)" >&2
377+
else
378+
cp -a "$f" /out/
379+
fi
380+
done
381+
fi
382+
""".strip()
383+
359384
docker_cmd = [
360385
"docker",
361386
"run",
@@ -367,8 +392,7 @@ def build_deb_package(app_dir: str, app_name: str, version: str = "0.1.0") -> bo
367392
image_tag,
368393
"/bin/bash",
369394
"-c",
370-
"find /usr/lib -maxdepth 1 -name 'libsynapse*.so*' -exec cp -a {} /out/ \\; && "
371-
"find /usr/lib -maxdepth 1 -name 'libonnxruntime*.so*' -exec cp -a {} /out/ \\;",
395+
extract_script,
372396
]
373397

374398
subprocess.run(docker_cmd, check=True)

synapse/cli/taps.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ def list_taps(args):
112112

113113
taps = tap.list_taps()
114114
table = Table(title="Available Taps", show_lines=True)
115-
table.add_column("Name", style="cyan")
116-
table.add_column("Message Type", style="green")
117-
table.add_column("Endpoint", style="green")
115+
table.add_column("Name", style="cyan", overflow="fold")
116+
table.add_column("Message Type", style="green", overflow="fold")
117+
table.add_column("Endpoint", style="green", overflow="fold")
118118

119119
for tap in taps:
120120
table.add_row(tap.name, tap.message_type, tap.endpoint)

0 commit comments

Comments
 (0)