From 3f1943c84d94ab5135f89d01227f2f29f06fa410 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 19 Jun 2024 11:38:24 +1000 Subject: [PATCH] Only copy source files onces when creating debug packages The Arch sharutils package was spewing messages about "Permission denied" when copying source files into the debug package. This is due to the source files having 444 permissions and being used in multiple binaries. Only copy each source file into the debug package onces to avoid this error. 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 db359167..0b44004c 100644 --- a/scripts/libmakepkg/tidy/strip.sh.in +++ b/scripts/libmakepkg/tidy/strip.sh.in @@ -60,7 +60,7 @@ package_source_files() { file="${srcdir}/${t}" dest="${dbgsrc}/${t}" mkdir -p "${dest%/*}" - if [[ -f "$file" ]]; then + if [[ -f "$file" && ! -f "$dest" ]]; then cp -- "$file" "$dest" fi done < <(source_files "$binary")