r1045 - in glibc-package/trunk/debian: . debhelper.in
Author: dan
Date: 2005-10-14 13:46:00 +0000 (Fri, 14 Oct 2005)
New Revision: 1045
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/debhelper.in/libc.preinst
Log:
* Do not complain about incompatible libraries in /etc/ld.so.conf
(Closes: #310047).
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2005-10-14 03:58:38 UTC (rev 1044)
+++ glibc-package/trunk/debian/changelog 2005-10-14 13:46:00 UTC (rev 1045)
@@ -21,8 +21,10 @@
(but omit the bit for make -k check) (Closes: #325460).
* Update debconf dependency to work with cdebconf (Closes: #331838).
* Merge MIPS <bits/syscall.h> fix from CVS (Closes: #329043).
+ * Do not complain about incompatible libraries in /etc/ld.so.conf
+ (Closes: #310047).
- -- Daniel Jacobowitz <dan@debian.org> Thu, 13 Oct 2005 23:57:32 -0400
+ -- Daniel Jacobowitz <dan@debian.org> Fri, 14 Oct 2005 09:44:11 -0400
glibc (2.3.5-6) unstable; urgency=low
Modified: glibc-package/trunk/debian/debhelper.in/libc.preinst
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.preinst 2005-10-14 03:58:38 UTC (rev 1044)
+++ glibc-package/trunk/debian/debhelper.in/libc.preinst 2005-10-14 13:46:00 UTC (rev 1045)
@@ -117,7 +117,9 @@
# location (/lib, /lib64, etc.) then things may break very badly
# as soon as ld.so is replaced by a new version. This check is not
# foolproof, but it's pretty accurate. This script ignores old
-# libc4 or libc5.
+# libc4 or libc5, and libraries incompatible with the to-be-installed
+# ld.so.
+
check_dirs () {
for dir in $*; do
# Handle /lib in LD_LIBRARY_PATH.
@@ -132,7 +134,23 @@
if test -d $dir; then
output=$(ls $dir | egrep '^lib(c|m|pthread|rt|dl)\.so\.[^/]*$' |\
egrep -v '^lib[cm]\.so\.[45].*$' 2>/dev/null)
+
if test -n "$output"; then
+ # See if the found libraries are compatible with the system ld.so;
+ # if they aren't, they'll be ignored. Check e_ident, e_type (which
+ # will just be ET_DYN), and e_machine. Assume that if one doesn't
+ # match, none of them will.
+ if test -f "$ld_so"; then
+ lib=$dir/`echo "$output" | head -1`
+ if test -f "$lib"; then
+ ldbytes=`head -c 20 $ld_so | od -c`
+ libbytes=`head -c 20 $lib | od -c`
+ if test "$ldbytes" != "$libbytes"; then
+ return 1
+ fi
+ fi
+ fi
+
echo "These libraries were found in $dir:"
echo "$output"
return 0
@@ -144,6 +162,9 @@
if [ "$1" != abort-upgrade ]
then
+ # First find the system ld.so.
+ ld_so=`ldd /bin/bash | sed 's/^\t//; s/ .*//' | grep /ld`
+
dirs="/usr/local/lib /usr/local/lib32 /usr/local/lib64"
if ! test -L /usr; then
dirs="$dirs /usr/lib /usr/lib32 /usr/lib64"
Reply to: