Author: aurel32
Date: 2014-02-26 22:36:50 +0000 (Wed, 26 Feb 2014)
New Revision: 5971

Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/debhelper.in/libc.preinst
Log:
debian/debhelper.in/libc.preinst: Don't fail if the dynamic loader
symlink is dangling or missing.

Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2014-02-26 22:17:38 UTC (rev 
5970)
+++ glibc-package/trunk/debian/changelog        2014-02-26 22:36:50 UTC (rev 
5971)
@@ -2,7 +2,9 @@
 
   !!! PLEASE MOVE ALL MAJOR DEVELOPMENT TO THE 2.19 BRANCH OR UPSTREAM !!!
 
-  * 
+  [ Aurelien Jarno ]
+  * debian/debhelper.in/libc.preinst: Don't fail if the dynamic loader
+    symlink is dangling or missing.
 
  -- Adam Conrad <[email protected]>  Sun, 23 Feb 2014 21:29:11 -0700
 

Modified: glibc-package/trunk/debian/debhelper.in/libc.preinst
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.preinst        2014-02-26 
22:17:38 UTC (rev 5970)
+++ glibc-package/trunk/debian/debhelper.in/libc.preinst        2014-02-26 
22:36:50 UTC (rev 5971)
@@ -262,8 +262,15 @@
 
     # Try to detect copies of the libc library in the various places
     # the dynamic linker uses.
-    ldfile=$(readlink -e RTLD_SO)
-    ldbytes=$(head -c 20 RTLD_SO | od -c)
+    ldfile=$(readlink -m RTLD_SO)
+    if test -f "$file" then
+        ldbytes=$(head -c 20 RTLD_SO | od -c)
+    else
+        # If the symlink to the dynamic linker is dangling or missing, set
+       # ldbytes to an empty string, the test below will fail and all the
+       # libraries found will be ignored.
+       ldbytes=""
+    fi
     libcfiles=$(dpkg-query -L $(package_name) 2>/dev/null)
 
     dirs="SLIBDIR /lib /lib/tls /lib32 /lib64 /usr/local/lib /usr/local/lib32 
/usr/local/lib64"
@@ -308,7 +315,7 @@
     # disable ldconfig if it is not the case. The symlink will be fixed when 
     # unpacking the new libc version and ldconfig will be re-enabled when
     # a new fixed version is unpacked.
-    if ! readlink -e RTLD_SO | grep -qE 'SLIBDIR/ld-[0-9.]+\.so' ; then
+    if ! readlink -m RTLD_SO | grep -qE 'SLIBDIR/ld-[0-9.]+\.so' ; then
         echo "Warning: found a potentially broken dynamic loader symlink,"
        echo "disabling ldconfig to avoid a possible system breakage. It"
        echo "will be reenabled when a new version of libc-bin is unpacked." 


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: https://lists.debian.org/[email protected]

Reply via email to