From 480f556d1557ee00e8e0264b419c65939c0effb8 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 31 Oct 2022 11:29:52 +0100 Subject: [PATCH] pck-update: resolve using rpm libraries not reported by ldconfig --- plugins/pck-update.in | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/pck-update.in b/plugins/pck-update.in index 3cc3db0..fa0588f 100644 --- a/plugins/pck-update.in +++ b/plugins/pck-update.in @@ -2378,8 +2378,16 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")" fi fi else - echo "\ -#$req: library not reported by ldconfig; run \`ldconfig' and try again" + # Find installed package providing library using rpm + buildreq= + rpm -q --qf %{name} --whatprovides "$req" &>/dev/null && + buildreq="$(rpm -q --qf "%{name}\n" --whatprovides "$req"|head -n1)" || + echo "#$req: library not reported by ldconfig and not provided in any installed package" + # Find providing package -devel if present + if [ "${buildreq}" != "" ]; then + rpm -q --qf %{name} "${buildreq}-devel" &>/dev/null && + buildreq="${buildreq}-devel" + fi fi elif [[ "$req" =~ .*python.*dist\(.*\).* ]]; then # Python dist requirement