process-debuginfo: Better search for vmlinux
Find first file, in any dir name, three levels max from $RPM_BUILD_DIR. Fix incompatibility found by building ovz kernel.
This commit is contained in:
parent
3bd1e2675b
commit
ea366ac608
@ -31,7 +31,7 @@ elif [ -z "${f#./lib/modules/*.ko.[gx]z}" ]; then
|
|||||||
elif [ -z "${f##./boot/vmlinuz-*}" ]; then
|
elif [ -z "${f##./boot/vmlinuz-*}" ]; then
|
||||||
# Compressed kernel: trigger extraction of vmlinux from the source.
|
# Compressed kernel: trigger extraction of vmlinux from the source.
|
||||||
kver=${f#./boot/vmlinuz-}
|
kver=${f#./boot/vmlinuz-}
|
||||||
vmlinuxs=$(set +f; ls "$RPM_BUILD_DIR"/kernel-image-*/kernel-source-*/vmlinux)
|
vmlinuxs=$(find "$RPM_BUILD_DIR" -depth -maxdepth 3 -type f -name vmlinux -print -quit)
|
||||||
vmlinuxd=./usr/lib/debug/lib/modules/$kver/vmlinux
|
vmlinuxd=./usr/lib/debug/lib/modules/$kver/vmlinux
|
||||||
|
|
||||||
if [ -f "$vmlinuxs" ]; then
|
if [ -f "$vmlinuxs" ]; then
|
||||||
@ -39,6 +39,7 @@ elif [ -z "${f##./boot/vmlinuz-*}" ]; then
|
|||||||
f=$vmlinuxd
|
f=$vmlinuxd
|
||||||
else
|
else
|
||||||
echo "Warning: vmlinux not found for -debuginfo" >&2
|
echo "Warning: vmlinux not found for -debuginfo" >&2
|
||||||
|
exit
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user