pck-update: resolve using rpm libraries not reported by ldconfig

This commit is contained in:
Silvan Calarco 2022-10-31 11:29:52 +01:00
parent db27bffab2
commit 480f556d15

View File

@ -2378,8 +2378,16 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")"
fi fi
fi fi
else else
echo "\ # Find installed package providing library using rpm
#$req: library not reported by ldconfig; run \`ldconfig' and try again" 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 fi
elif [[ "$req" =~ .*python.*dist\(.*\).* ]]; then elif [[ "$req" =~ .*python.*dist\(.*\).* ]]; then
# Python dist requirement # Python dist requirement