From 5f4c7e3ddc02d4e5ed20f858fd22a7f811ac17a4 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 24 Dec 2024 22:35:38 +1000 Subject: [PATCH] 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 --- scripts/libmakepkg/tidy/strip.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in index 6b14862f..09e28c04 100644 --- a/scripts/libmakepkg/tidy/strip.sh.in +++ b/scripts/libmakepkg/tidy/strip.sh.in @@ -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") }