Author: aurel32
Date: 2014-03-02 14:29:28 +0000 (Sun, 02 Mar 2014)
New Revision: 5979

Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/debhelper.in/libc.postrm
Log:
debian/debhelper.in/libc.postrm: generalize the dynamic linker
symlink creation to all biarch packages.

Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2014-03-02 11:59:01 UTC (rev 
5978)
+++ glibc-package/trunk/debian/changelog        2014-03-02 14:29:28 UTC (rev 
5979)
@@ -8,6 +8,8 @@
   * debian/debhelper.in/libc.preinst: only disable ldconfig after making
     sure a fixed version hasn't already been unpacked, as the unpack order
     is not guaranteed.
+  * debian/debhelper.in/libc.postrm: generalize the dynamic linker
+    symlink creation to all biarch packages.
   * debian/debhelper.in/libc-alt.postrm: generalize the dynamic linker
     symlink removal to all biarch packages.
 

Modified: glibc-package/trunk/debian/debhelper.in/libc.postrm
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.postrm 2014-03-02 11:59:01 UTC 
(rev 5978)
+++ glibc-package/trunk/debian/debhelper.in/libc.postrm 2014-03-02 14:29:28 UTC 
(rev 5979)
@@ -9,13 +9,23 @@
            suidunregister -s LIBC /usr/libexec/pt_chown
        fi
     fi
+    # When both the multiarch and the corresponding biarch packages are
+    # installed, removing the multiarch package will remove the dynamic
+    # linker. Recreate it in the postinst.
     ARCH=${DPKG_MAINTSCRIPT_ARCH:-$(dpkg --print-architecture)}
-    if [ "${ARCH}" = "i386" ]; then
-       if [ -f /lib32/ld-linux.so.2 ] && [ ! -f /lib/ld-linux.so.2 ]; then
-           ln -sf /lib32/ld-linux.so.2 /lib/ld-linux.so.2
-       elif [ -h /lib/ld-linux.so.2 ] && [ ! -f /lib/ld-linux.so.2 ]; then
-           rm /lib/ld-linux.so.2
-       fi
+    case "${ARCH}" in
+        kfreebsd-i386 | s390 | powerpc)
+            target="/lib32/ld.so.1"
+            ;;
+        i386 | sparc)
+            target="/lib32/ld-linux.so.2"
+            ;;
+        *)
+            target="$(dpkg-query -L LIBC-${ARCH} 2>/dev/null | grep -E 
'/lib.*/ld-[0-9.]+\.so$' || true)"
+            ;;
+    esac
+    if [ -f "$target" ] && ! [ -f RTLD_SO ] ; then
+        ln -sf ${target#$(dirname RTLD_SO)/} RTLD_SO
     fi
 fi
 


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/e1wk7ot-0004jy...@moszumanska.debian.org

Reply via email to