Accepting request 733026 from home:tomdevries:branches:devel:gcc-gdb-librpm-2

- Use ldd /bin/rpm instead of ls /usr/%{_lib}/ to find librpm

OBS-URL: https://build.opensuse.org/request/show/733026
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=226
This commit is contained in:
Michael Matz 2019-09-26 14:06:39 +00:00 committed by Git OBS Bridge
parent 8771b4d786
commit 7942f114e3
2 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Sep 22 05:54:09 UTC 2019 - Tom de Vries <tdevries@suse.com>
- Use ldd /usr/bin/rpm instead of ls /usr/%{_lib}/ to find librpm
-------------------------------------------------------------------
Sat Sep 14 05:45:30 UTC 2019 - Michel Normand <normand@linux.vnet.ibm.com>

View File

@ -669,12 +669,10 @@ LDFLAGS="$LDFLAGS -L$PWD/processor-trace-%{libipt_version}-root%{_libdir}"
export CXXFLAGS="$CFLAGS"
export LIBRPM=$(ls -1 /usr/%{_lib}/ \
| grep '^librpm.so.[0-9][0-9]*$' \
| sort -V -r \
| head -n 1)
export LIBRPM=$(ldd /bin/rpm \
| grep librpm.so \
| awk '{print $3}')
if [ "$LIBRPM" != "" ]; then
export LIBRPM="/usr/%{_lib}/$LIBRPM"
[ -f "$LIBRPM" ]
else
export LIBRPM=no