From ce50982d41818478746e4d239f4e402c9f7e84f9 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Fri, 26 Jan 2024 09:25:41 -0500 Subject: [PATCH] snapcraft: only try to strip criu if present Signed-off-by: Simon Deziel --- snapcraft.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 0e93a6132..8e4a44b7c 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1584,8 +1584,11 @@ parts: -exec strip -s {} + # Strip binaries not under bin/ due to being dynamically - # added to the path with `snap set lxd` - strip -s "${CRAFT_PRIME}/criu/criu" # snap set lxd criu.enable=true + # added to the path with `snap set lxd`, like `criu.enable=true` + for binary in "${CRAFT_PRIME}/criu/criu"; do + [ -e "${binary}" ] || continue + strip -s "${binary}" + done # Strip all versions of zfs utils for v in "${CRAFT_PRIME}"/zfs-*; do