process-debuginfo: Do not call eu-elfcompress if it doesn't exist

E2K arch have old elfutils-0.159 which doesn't have eu-elfcompress.
Error:

  /usr/lib/rpm/process-debuginfo: line 68: eu-elfcompress: command not found

Reported-by: Andrey Savchenko <bircoph@altlinux.org>
This commit is contained in:
Виталий Чикунов 2020-07-09 18:20:51 +03:00
parent 30d528d7bc
commit ae1ecef8bd

View File

@ -64,7 +64,7 @@ if [ -n "$strip" ]; then
mkdir -p "${debugf%/*}"
LD_ORIGIN_PATH=/usr/bin eu-strip $strip --remove-comment -f "$debugf" "$f"
if [ -n "$elfcompress" ]; then
if [ -n "$elfcompress" ] && [ -x /usr/bin/eu-elfcompress ]; then
LD_ORIGIN_PATH=/usr/bin eu-elfcompress --quiet "$debugf"
fi