aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorten Linderud <morten@linderud.pw>2022-05-27 18:44:52 +0200
committerAllan McRae <allan@archlinux.org>2022-06-25 10:45:04 +1000
commit776b7c1e75f24b9cab86b797c1acf549c7da2c46 (patch)
tree5176c5cd3c0795f6ac2f2bc08703ea66c6e6bca3
parent0031cd1e46834a09b83b1d00a4a1d9d3620c76f5 (diff)
debugflags: Ensure we have unique source paths
In some cases packages are built outside of a directory which contains pkgname-pkgver, this results in source listing in debug packages having a conflicting path like `/usr/src/debug/build/` which is not ideal. This patch ensures we always include the pkgbase to ensure the paths are unique. Signed-off-by: Morten Linderud <morten@linderud.pw> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--scripts/libmakepkg/buildenv/debugflags.sh.in6
-rw-r--r--scripts/libmakepkg/tidy/strip.sh.in2
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/libmakepkg/buildenv/debugflags.sh.in b/scripts/libmakepkg/buildenv/debugflags.sh.in
index 1cb58613..2bdb8b0b 100644
--- a/scripts/libmakepkg/buildenv/debugflags.sh.in
+++ b/scripts/libmakepkg/buildenv/debugflags.sh.in
@@ -30,9 +30,9 @@ buildenv_functions+=('buildenv_debugflags')
buildenv_debugflags() {
if check_option "debug" "y" && ! check_option "buildflags" "n"; then
- DEBUG_CFLAGS+=" -ffile-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
- DEBUG_CXXFLAGS+=" -ffile-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
- DEBUG_RUSTFLAGS+=" --remap-path-prefix=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
+ DEBUG_CFLAGS+=" -ffile-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}/${pkgbase}"
+ DEBUG_CXXFLAGS+=" -ffile-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}/${pkgbase}"
+ DEBUG_RUSTFLAGS+=" --remap-path-prefix=$srcdir=${DBGSRCDIR:-/usr/src/debug}/${pkgbase}"
CFLAGS+=" $DEBUG_CFLAGS"
CXXFLAGS+=" $DEBUG_CXXFLAGS"
RUSTFLAGS+=" $DEBUG_RUSTFLAGS"
diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in
index 4cf2107c..91c66f13 100644
--- a/scripts/libmakepkg/tidy/strip.sh.in
+++ b/scripts/libmakepkg/tidy/strip.sh.in
@@ -47,7 +47,7 @@ source_files() {
LANG=C debugedit --no-recompute-build-id \
--base-dir "${srcdir}" \
- --dest-dir "${dbgsrcdir}" \
+ --dest-dir "${dbgsrcdir}/${pkgbase}" \
--list-file /dev/stdout "$1" \
| sort -zu | tr '\0' '\n'
}