From 76e829f045f92bf49ba7609f2e249d0b0185b392 Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Fri, 3 Feb 2012 23:31:24 +0100 Subject: [PATCH] pck-update: (-a6): fix for /lib/ld-linux.so.2 -> ld-2.14.1.so Signed-off-by: Davide Madrisan --- ChangeLog | 3 +++ plugins/pck-update.in | 22 ++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 912b6c2..b7f7d18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,9 @@ Changes in version 1.9.2 format_unpackaged_file_list: 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 diff --git a/plugins/pck-update.in b/plugins/pck-update.in index cd93d6b..07307ad 100644 --- a/plugins/pck-update.in +++ b/plugins/pck-update.in @@ -2401,13 +2401,20 @@ $pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm" solibpath_catch="" # is a shared library # req="libGL.so.1(libc6)" => /usr/lib/libGL.so - solibpath=$($path_ldconfig -Np | \ - sed -n "s, ,,g;/${req/(*)/}/{ - s,.*=>,,;s,\.so\..*,.so,p}") - notify.debug "req=\"$req\" => solibpath=\"$solibpath\"" + reqpath=$($path_ldconfig -Np | \ + sed -n "s, ,,g;/${req/(*)/}/{s,.*=>,,;p}") + solibpath="${reqpath/\.so\.*/.so}" + notify.debug "\ +req=\"$req\" ($reqpath) =?> solibpath=\"$solibpath\"" 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" + notify.debug " solibpath_catch = $solibpath_catch" else # let's try removing version extension in libname # (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|")" if [ -e $solibpath_alternate ]; then solibpath_catch="$solibpath_alternate" + notify.debug " solibpath_catch = $solibpath_catch" else if [ "${solibpath:0:5}" = "/lib/" -o \ "${solibpath:0:7}" = "/lib64/" ]; then [ -e "/usr${solibpath}" ] && - solibpath_catch="/usr${solibpath}" + { solibpath_catch="/usr${solibpath}" + notify.debug \ + " solibpath_catch = $solibpath_catch"; } fi fi fi