debuginfo: Create empty src/debug directories for paths with `..'
Create empty directories under `/usr/src/debug` tree for source paths containing `..` (for example `../../src` in elfutils). This should fix debuginfo sources for autotools builds in subdir. Fixes: https://bugzilla.altlinux.org/39175
This commit is contained in:
parent
bb0b76e759
commit
309af2d59e
@ -96,10 +96,15 @@ fi
|
|||||||
mkdir -p .debuginfo/src/"${f%/*}"
|
mkdir -p .debuginfo/src/"${f%/*}"
|
||||||
awk 'BEGIN{RS="\0";ORS="\n"}{print}' .tmp/src.$$ |LC_ALL=C sort -u |
|
awk 'BEGIN{RS="\0";ORS="\n"}{print}' .tmp/src.$$ |LC_ALL=C sort -u |
|
||||||
while read -r src; do
|
while read -r src; do
|
||||||
[ -f "$RPM_BUILD_DIR"/"$src" ] || continue
|
if [ -f "$RPM_BUILD_DIR"/"$src" ]; then
|
||||||
if [ ! -f ./usr/src/debug/"$src" ]; then
|
if [ ! -f ./usr/src/debug/"$src" ]; then
|
||||||
install -pD -m644 "$RPM_BUILD_DIR"/"$src" ./usr/src/debug/"$src".$$
|
install -pD -m644 "$RPM_BUILD_DIR"/"$src" ./usr/src/debug/"$src".$$
|
||||||
mv -f ./usr/src/debug/"$src".$$ ./usr/src/debug/"$src"
|
mv -f ./usr/src/debug/"$src".$$ ./usr/src/debug/"$src"
|
||||||
|
fi
|
||||||
|
elif [ -d "$RPM_BUILD_DIR"/"$src" ]; then
|
||||||
|
mkdir -p ./usr/src/debug/"$src"
|
||||||
|
else
|
||||||
|
continue
|
||||||
fi
|
fi
|
||||||
printf '%s\n' /usr/src/debug/"$src"
|
printf '%s\n' /usr/src/debug/"$src"
|
||||||
done >.debuginfo/src/"$f"
|
done >.debuginfo/src/"$f"
|
||||||
|
Loading…
Reference in New Issue
Block a user