diff -urN sorcery.ori/var/lib/sorcery/modules/libdispel sorcery/var/lib/sorcery/modules/libdispel --- sorcery.ori/var/lib/sorcery/modules/libdispel 2004-11-13 22:06:16.000000000 +0100 +++ sorcery/var/lib/sorcery/modules/libdispel 2005-02-16 12:15:03.574065843 +0100 @@ -108,12 +108,16 @@ rm -f $REAPER_FILES $REAPER_DIRS $REAPER_SYMS + # LD_SO=/lib/ld-linux.so.2 (we never remove this file!) + LD_SO=`ldd /bin/ls | awk '{print $1}' | grep "^/" | tail -1` + # convert from TRACK_ROOT to / for protected/excluded filtering, # then to INSTALL_ROOT. # INSTALL_ROOT is relative to /, TRACK_ROOT is arbitrary. sed "s:^$TRACK_ROOT::" $1 | filter $PROTECTED | filter $EXCLUDED | + grep -v "^${LD_SO}\$" | sed "s:^:$INSTALL_ROOT:" | while read ITEM; do if [ -h "$ITEM" ]; then echo "$ITEM" >> $REAPER_SYMS diff -urN sorcery.ori/var/lib/sorcery/modules/libsorcery sorcery/var/lib/sorcery/modules/libsorcery --- sorcery.ori/var/lib/sorcery/modules/libsorcery 2004-11-29 18:01:14.000000000 +0100 +++ sorcery/var/lib/sorcery/modules/libsorcery 2005-02-16 12:15:03.575065650 +0100 @@ -231,12 +231,28 @@ else export LD_LIBRARY_PATH="$OLD_LIBS:$LD_LIBRARY_PATH" fi - if [ "$SPELL" == "glibc" ] || - [ "$SPELL" == "glibc-custom" ] ; then - if [ -e $OLD_LIBS/ld-$OLD_VERSION.so ] ; then - [[ `uname -m` == ppc* ]] && ln -sf $OLD_LIBS/ld-$OLD_VERSION.so ${INSTALL_ROOT}/lib/ld.so.1 || - ln -sf $OLD_LIBS/ld-$OLD_VERSION.so ${INSTALL_ROOT}/lib/ld-linux.so.2 - fi +# get the named of the dynamic loader with a well know dynamic binary : /bin/sh +# on most platform it is : /lib/ld-linux.so.2, but it can be +# /lib/ld.so.1 on ppc or /lib64/ld-linux-x86-64.so.2 on x86_64 + +# to detect it, we use the last library linked with an absolute path + +# LD_SO=/lib/ld-linux.so.2 + LD_SO=`ldd /bin/ls | awk '{print $1}' | grep "^/" | tail -1` +# LD_SO_REAL=/lib/ld-2.3.2.so + LD_SO_REAL=`readlink -f "${LD_SO}"` +# LD_SO_NAME=ld-linux.so.2 + LD_SO_NAME=`basename "${LD_SO}"` + + if grep -q "${LD_SO}" "${OLD_LOG}" \ + || grep -q "${LD_SO_REAL}" "${OLD_LOG}"; then + +# since the loader is in the old log, it will be removed, so we make a +# special link + + echo "*** ln -sf ${OLD_LIBS}/${LD_SO_NAME} ${INSTALL_ROOT}/${LD_SO}" + ln -sf "${OLD_LIBS}/${LD_SO_NAME}" "${INSTALL_ROOT}/${LD_SO}" + fi }