abuild: fix doc hardlinks replaced nondeterministic

default_doc replaces hardlinks with symlinks. Which files are symlinked
and which file is replaced was depending on the order of the files found
by find(1) which is not deterministic.
This commit is contained in:
Sertonix 2024-10-15 18:26:59 +02:00 committed by Natanael Copa
parent ef10aaede9
commit 883d408c87

View File

@ -1991,7 +1991,7 @@ default_doc() {
[ -d "$mandir" ] && find "$mandir" -type f \
-a \( -name \*.[0-8n] -o -name \*.[0-8][a-z]* \) \
-a \! \( -name '*.gz' -o -name '*.bz2' -o -name '*.xz' \) \
-exec stat -c "%i %n" \{\} \+ | while read inode name; do
-exec stat -c "%i %n" \{\} \+ | sort | while read inode name; do
# Skip hardlinks removed in last iteration.
[ -f "$name" ] || continue