summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2024-06-19 11:38:24 +1000
committerAllan McRae <allan@archlinux.org>2024-06-20 00:34:32 +0000
commit3f1943c84d94ab5135f89d01227f2f29f06fa410 (patch)
tree6ac17f266f292e751643b8d764d3a5479b5bdcae
parentc9acfc2b50b79390c58d8aa52a134030e7cec58a (diff)
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 <allan@archlinux.org>
-rw-r--r--scripts/libmakepkg/tidy/strip.sh.in2
1 files changed, 1 insertions, 1 deletions
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")