File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
pkgs/build-support/setup-hooks Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ stripDirs() {
6868 striperr=" $( mktemp ' striperr.XXXXXX' ) "
6969 # Do not strip lib/debug. This is a directory used by setup-hooks/separate-debug-info.sh.
7070 find $paths -type f -a ' !' -path " $prefix /lib/debug/*" -print0 |
71+ # Make sure we process files under symlinks only once. Otherwise
72+ # 'strip` can corrupt files when writes to them in parallel:
73+ # https://github.com/NixOS/nixpkgs/issues/246147#issuecomment-1657072039
74+ xargs -r -0 -n1 -- realpath -z | sort -u -z |
75+
7176 xargs -r -0 -n1 -P " $NIX_BUILD_CORES " -- $cmd $stripFlags 2> " $striperr " || exit_code=$?
7277 # xargs exits with status code 123 if some but not all of the
7378 # processes fail. We don't care if some of the files couldn't
You can’t perform that action at this time.
0 commit comments