libmakepkg: strip - disguard error messages when copying source files

Parallel processing of file stripping is causing a TOC/TOU race when copying
source files into the debug location resulting in error messages from cp.
While hiding this error is not the ideal solution, it is currently the only
one we have. Given this is a error of our own making, and we understand the
cause and have determined there is zero actual downside to ignoring the
error, we will accept this approach until something better is found.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2024-12-24 22:35:38 +10:00
parent 02b35b9155
commit 5f4c7e3ddc

View file

@ -61,7 +61,7 @@ package_source_files() {
dest="${dbgsrc}/${t}"
mkdir -p "${dest%/*}"
if [[ -f "$file" && ! -f "$dest" ]]; then
cp -- "$file" "$dest"
cp -- "$file" "$dest" 2>/dev/null
fi
done < <(source_files "$binary")
}