[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r5974 - in glibc-package/trunk/debian: . debhelper.in



Author: aurel32
Date: 2014-02-27 09:30:17 +0000 (Thu, 27 Feb 2014)
New Revision: 5974

Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/debhelper.in/libc.preinst
Log:
debian/debhelper.in/libc.preinst: onlt disable ldconfig after making
sure a fixed version hasn't already been unpacked, as the unpack order
is not guaranteed.

Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2014-02-27 09:28:23 UTC (rev 5973)
+++ glibc-package/trunk/debian/changelog	2014-02-27 09:30:17 UTC (rev 5974)
@@ -5,6 +5,9 @@
   [ Aurelien Jarno ]
   * debian/debhelper.in/libc.preinst: Don't fail if the dynamic loader
     symlink is dangling or missing.  Closes: #740158, #740196.
+  * debian/debhelper.in/libc.preinst: onlt disable ldconfig after making
+    sure a fixed version hasn't already been unpacked, as the unpack order
+    is not guaranteed.
 
  -- Adam Conrad <adconrad@0c3.net>  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-27 09:28:23 UTC (rev 5973)
+++ glibc-package/trunk/debian/debhelper.in/libc.preinst	2014-02-27 09:30:17 UTC (rev 5974)
@@ -312,14 +312,20 @@
     # of the same architecture than the native one has been installed (e.g.:
     # libc6-amd64:i386 on amd64). Try to detect this by checking that the 
     # ld.so symlink correctly points to ld-*.so in the slib directory, and 
-    # 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.
+    # disabling ldconfig if it is not the case and the new version hasn't
+    # been unpacked yet. 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 -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." 
-	ln -sf /bin/true /sbin/ldconfig
+        # The unpack order is not guaranteed, only disable ldconfig if 
+        # a "broken" version is installed.
+        libc_bin_version=$(dpkg-query -W -f='${Version}' libc-bin)
+        if dpkg --compare-versions "$libc_bin_version" lt "2.18-2"; 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." 
+            ln -sf /bin/true /sbin/ldconfig
+        fi
     fi
 fi
 


Reply to: