From 10262ccfc24397d4c8da0f1630df8c291541d4c0 Mon Sep 17 00:00:00 2001 From: Archipelago Date: Fri, 13 Nov 2026 17:44:23 +0300 Subject: [PATCH] Adapter cache: hash the script content, not its path sha256sum prints the file path next to the digest, and the build path carries the run id, so every run produced a new cache key and rebuilt both adapters. Read the script through stdin so only its content enters the key. --- pipeline/build-discover-adapter.sh | 2 +- pipeline/build-software-adapter.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pipeline/build-discover-adapter.sh b/pipeline/build-discover-adapter.sh index 78d5a9f..70619f1 100644 --- a/pipeline/build-discover-adapter.sh +++ b/pipeline/build-discover-adapter.sh @@ -12,7 +12,7 @@ mkdir -p "$output" sources="$(dirname "$cache")/desktop-sources" mkdir -p "$sources" -key=$( { sha256sum "$0"; printf '%s\n' "$mirror"; +key=$( { sha256sum < "$0"; printf '%s\n' "$mirror"; ( cd "$source_root" && find system/integrations/discover contracts/dbus builder/packages/plasma-setup \ -type f -print0 | LC_ALL=C sort -z | xargs -0 sha256sum ); } | sha256sum | cut -d' ' -f1 ) cached=$(dirname "$cache")/adapters/discover-$key diff --git a/pipeline/build-software-adapter.sh b/pipeline/build-software-adapter.sh index c9a39bd..0b1a1e3 100644 --- a/pipeline/build-software-adapter.sh +++ b/pipeline/build-software-adapter.sh @@ -10,7 +10,7 @@ output=$4 mirror=${ARCHIPELAGO_MIRROR_URL:-'https://mirror.nw-sys.ru/archlinux/$repo/os/$arch'} mkdir -p "$output" -key=$( { sha256sum "$0"; printf '%s\n' "$mirror"; +key=$( { sha256sum < "$0"; printf '%s\n' "$mirror"; ( cd "$source_root" && find system/integrations/gnome-software contracts/dbus -type f -print0 | LC_ALL=C sort -z | xargs -0 sha256sum ); } | sha256sum | cut -d' ' -f1 ) cached=$(dirname "$cache")/adapters/software-$key