Fix tar race condition when tix-port(8) strips programs.

This commit is contained in:
Jonas 'Sortie' Termansen 2023-07-16 12:58:01 +02:00
parent d189183900
commit 33c1e98f0e
1 changed files with 1 additions and 2 deletions

View File

@ -444,8 +444,7 @@ strip_tix() {(
$strip -d "$data_dir/sbin/"* 2>/dev/null || true
(cd "$dir" &&
LC_ALL=C ls -A | grep -Ev '^tix$' |
tar --numeric-owner --owner=0 --group=0 -cJf port.tar.tix.xz tix -T -)
cp "$dir/port.tar.tix.xz" "$1"
tar --numeric-owner --owner=0 --group=0 -cJf "$1" tix -T -)
rm -rf "$dir"
)}