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