From 62b84cf4f4eafc01920ea2bd167f802faec21dc4 Mon Sep 17 00:00:00 2001 From: lotherk Date: Fri, 13 Nov 2026 18:31:03 +0000 Subject: [PATCH] userland.sh: a fork of ext/ is cleaned only when its recipe or archive changed (MCDE was built again every run) Co-Authored-By: Claude Sonnet 5.5 --- tools/userland.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/userland.sh b/tools/userland.sh index 5218e296e6..7b993ddb23 100755 --- a/tools/userland.sh +++ b/tools/userland.sh @@ -129,10 +129,17 @@ fi ext_prepare failed= for p in $("$TOP/tools/pkglist.sh" built); do - # a fork of ext/ starts from a clean work directory: a changed recipe - # does not re-run configure otherwise + # a fork of ext/ starts from a clean work directory when its recipe or its + # archive (distinfo) changed -- otherwise pkgsrc keeps the old configure -- + # and from nothing else: an unchanged fork is not built again case " $(echo $FORKS) " in - *" $p "*) (cd "$PKGSRC/$p" && "$BMAKE" clean) > /dev/null 2>&1 || true ;; + *" $p "*) + key=$(cd "$PKGSRC/$p" && find . -type f | sort | xargs cat | sha256sum | cut -d" " -f1) + kf=$TOP/build/pkgsrc-work/$p/.makronix-recipe-key + if [ "$(cat "$kf" 2>/dev/null)" != "$key" ]; then + (cd "$PKGSRC/$p" && "$BMAKE" clean) > /dev/null 2>&1 || true + mkdir -p "${kf%/*}" && printf "%s\n" "$key" > "$kf" + fi ;; esac echo "=== $MODE: $p" # set: installed into the sysroot; repo: the binary package (pkgsrc