pck-update: (-a6): fix for /lib/ld-linux.so.2 -> ld-2.14.1.so

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2012-02-03 23:31:24 +01:00
parent 062ef27deb
commit 76e829f045
2 changed files with 19 additions and 6 deletions

View File

@ -14,6 +14,9 @@ Changes in version 1.9.2
format_unpackaged_file_list: format_unpackaged_file_list:
swap %{_libexecdir} and %{_libdir} substitutions. swap %{_libexecdir} and %{_libdir} substitutions.
* pck-update - Davide Madrisan:
Action 6: fix for /lib/ld-linux.so.2 -> ld-2.14.1.so
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 1.9.1 Changes in version 1.9.1

View File

@ -2401,13 +2401,20 @@ $pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
solibpath_catch="" solibpath_catch=""
# is a shared library # is a shared library
# req="libGL.so.1(libc6)" => /usr/lib/libGL.so # req="libGL.so.1(libc6)" => /usr/lib/libGL.so
solibpath=$($path_ldconfig -Np | \ reqpath=$($path_ldconfig -Np | \
sed -n "s, ,,g;/${req/(*)/}/{ sed -n "s, ,,g;/${req/(*)/}/{s,.*=>,,;p}")
s,.*=>,,;s,\.so\..*,.so,p}") solibpath="${reqpath/\.so\.*/.so}"
notify.debug "req=\"$req\" => solibpath=\"$solibpath\"" notify.debug "\
req=\"$req\" ($reqpath) =?> solibpath=\"$solibpath\""
if [ "$solibpath" ]; then if [ "$solibpath" ]; then
if [ -e $solibpath ]; then # example: /lib/ld-linux.so.2
if [[ -L $reqpath && \
"$(readlink -f $reqpath)" =~ .*\.so$ ]]; then
solibpath_catch="$(readlink -f $reqpath)"
notify.debug " solibpath_catch = $solibpath_catch"
elif [ -e $solibpath ]; then
solibpath_catch="$solibpath" solibpath_catch="$solibpath"
notify.debug " solibpath_catch = $solibpath_catch"
else else
# let's try removing version extension in libname # let's try removing version extension in libname
# (eg. liblber-2.2.so => liblber.so) # (eg. liblber-2.2.so => liblber.so)
@ -2415,11 +2422,14 @@ $pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
$(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")" $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")"
if [ -e $solibpath_alternate ]; then if [ -e $solibpath_alternate ]; then
solibpath_catch="$solibpath_alternate" solibpath_catch="$solibpath_alternate"
notify.debug " solibpath_catch = $solibpath_catch"
else else
if [ "${solibpath:0:5}" = "/lib/" -o \ if [ "${solibpath:0:5}" = "/lib/" -o \
"${solibpath:0:7}" = "/lib64/" ]; then "${solibpath:0:7}" = "/lib64/" ]; then
[ -e "/usr${solibpath}" ] && [ -e "/usr${solibpath}" ] &&
solibpath_catch="/usr${solibpath}" { solibpath_catch="/usr${solibpath}"
notify.debug \
" solibpath_catch = $solibpath_catch"; }
fi fi
fi fi
fi fi