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>
(cherry picked from commit 776b7c1e75
)
This commit is contained in:
parent
ce40629b7d
commit
d55924dbd7
2 changed files with 4 additions and 4 deletions
|
@ -30,9 +30,9 @@ buildenv_functions+=('buildenv_debugflags')
|
||||||
|
|
||||||
buildenv_debugflags() {
|
buildenv_debugflags() {
|
||||||
if check_option "debug" "y" && ! check_option "buildflags" "n"; then
|
if check_option "debug" "y" && ! check_option "buildflags" "n"; then
|
||||||
DEBUG_CFLAGS+=" -ffile-prefix-map=$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}"
|
DEBUG_CXXFLAGS+=" -ffile-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}/${pkgbase}"
|
||||||
DEBUG_RUSTFLAGS+=" --remap-path-prefix=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
|
DEBUG_RUSTFLAGS+=" --remap-path-prefix=$srcdir=${DBGSRCDIR:-/usr/src/debug}/${pkgbase}"
|
||||||
CFLAGS+=" $DEBUG_CFLAGS"
|
CFLAGS+=" $DEBUG_CFLAGS"
|
||||||
CXXFLAGS+=" $DEBUG_CXXFLAGS"
|
CXXFLAGS+=" $DEBUG_CXXFLAGS"
|
||||||
RUSTFLAGS+=" $DEBUG_RUSTFLAGS"
|
RUSTFLAGS+=" $DEBUG_RUSTFLAGS"
|
||||||
|
|
|
@ -47,7 +47,7 @@ source_files() {
|
||||||
|
|
||||||
LANG=C debugedit --no-recompute-build-id \
|
LANG=C debugedit --no-recompute-build-id \
|
||||||
--base-dir "${srcdir}" \
|
--base-dir "${srcdir}" \
|
||||||
--dest-dir "${dbgsrcdir}" \
|
--dest-dir "${dbgsrcdir}/${pkgbase}" \
|
||||||
--list-file /dev/stdout "$1" \
|
--list-file /dev/stdout "$1" \
|
||||||
| sort -zu | tr '\0' '\n'
|
| sort -zu | tr '\0' '\n'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue