pkgchroot: the staleness key survives a recipe without options.mk
Under set -e the cat of the absent options.mk ended the key's group before the source id was written: a commit in ext/src/mcde never changed the key, so the MacBook kept building the old work directory (UilLexPars.h: File exists, three runs). Optional files get '|| :'; find -L, because the recipe mirror is symlinks and PLIST/patches were not hashed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e2293a29c3
commit
1e4ac1135c
1 file changed
+8
-4
+8
-4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user