diff --git a/tools/pkgchroot.sh b/tools/pkgchroot.sh index b80403424e..4723f3446a 100755 --- a/tools/pkgchroot.sh +++ b/tools/pkgchroot.sh @@ -198,11 +198,15 @@ sandbox_stale() elif [ -f "$TOP/pkgsrc/$sr_path/distinfo" ]; then srcid=$(sha256_in < "$TOP/pkgsrc/$sr_path/distinfo") fi + # `|| :' on every optional file: this script runs under `set -e', and a + # recipe without options.mk made cat fail and end the group before the + # source id was printed, so the commit never reached the key (measured + # 2026-11-24, x11/mcde-motif). find -L: a mirrored recipe is symlinks. key=$( { cat "$TOP/pkgsrc/$sr_path"/Makefile \ - "$TOP/pkgsrc/$sr_path"/options.mk 2>/dev/null - find "$TOP/pkgsrc/$sr_path" -type f \( -name '*.patch' -o -name 'PLIST*' \) \ - -exec cat {} + 2>/dev/null - cat "$TOP/pkgsrc/$sr_path"/distinfo 2>/dev/null + "$TOP/pkgsrc/$sr_path"/options.mk 2>/dev/null || : + find -L "$TOP/pkgsrc/$sr_path" -type f \( -name '*.patch' -o -name 'PLIST*' \) \ + -exec cat {} + 2>/dev/null || : + cat "$TOP/pkgsrc/$sr_path"/distinfo 2>/dev/null || : printf '%s\n' "$srcid" } | sha256_in ) kf=$TOP/build/pkgsrc-work/$sr_path/.makronix-build-key