Commit 776b7c1e authored by Morten Linderud's avatar Morten Linderud 🏄 Committed by Allan McRae
Browse files

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
Signed-off-by: Morten Linderud's avatarMorten Linderud <>
Signed-off-by: Allan McRae's avatarAllan McRae <>
parent 0031cd1e
......@@ -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}"
......@@ -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'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment