Author: barbier
Date: 2006-04-11 22:48:28 +0000 (Tue, 11 Apr 2006)
New Revision: 1415

Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/debhelper.in/libc.preinst
   glibc-package/trunk/debian/rules.d/debhelper.mk
Log:
Remove ldd calls in libc.preinst.


Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2006-04-11 19:12:43 UTC (rev 
1414)
+++ glibc-package/trunk/debian/changelog        2006-04-11 22:48:28 UTC (rev 
1415)
@@ -12,11 +12,14 @@
     (Closes: #340871)
   * Add beginning and end timestamps to both the build logs and the
     testsuite logs.  (Closes: #155690)
-  * debian/sysdeps/sparc.mk: build sparcv9b optimized libraries with 
+  * debian/sysdeps/sparc.mk: build sparcv9b optimized libraries with
     -mtune=ultrasparc3.
 
- -- Aurelien Jarno <[EMAIL PROTECTED]>  Tue, 11 Apr 2006 00:54:26 +0200
+  [ Denis Barbier ]
+  * Remove ldd calls in libc.preinst.
 
+ -- Denis Barbier <[EMAIL PROTECTED]>  Tue, 11 Apr 2006 21:24:13 +0200
+
 glibc (2.3.6-6) unstable; urgency=low
 
   [ Aurelien Jarno ]

Modified: glibc-package/trunk/debian/debhelper.in/libc.preinst
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.preinst        2006-04-11 
19:12:43 UTC (rev 1414)
+++ glibc-package/trunk/debian/debhelper.in/libc.preinst        2006-04-11 
22:48:28 UTC (rev 1415)
@@ -129,22 +129,24 @@
       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
+       # will just be ET_DYN), and e_machine.  If a match is found, there
+       # is a risk of breakage.
+       for lib in $output
+       do
+         if test -f "$dir/$lib"; then
+           libbytes=`head -c 20 $dir/$lib | od -c`
+           for ld_so in $ld_so_list
+           do
+             if test -f "$ld_so"; then
+               ldbytes=`head -c 20 $ld_so | od -c`
+               if test "$ldbytes" = "$libbytes"; then
+                 echo "Matching libraries: $dir/$lib $ld_so"
+                 return 0
+               fi
+             fi
+           done
          fi
-       fi
-
-       echo "These libraries were found in $dir:"
-       echo "$output"
-       return 0
+       done
       fi
     fi
   done
@@ -153,9 +155,7 @@
 
 if [ "$1" != abort-upgrade ]
 then
-  # First find the system ld.so.
-  ld_so=`ldd /bin/bash | sed 's/^\t//; s/ .*//' | grep /ld`
-
+  ld_so_list=RTLDLIST
   dirs="/usr/local/lib /usr/local/lib32 /usr/local/lib64"
   if ! test -L /usr; then
     dirs="$dirs /usr/lib /usr/lib32 /usr/lib64"

Modified: glibc-package/trunk/debian/rules.d/debhelper.mk
===================================================================
--- glibc-package/trunk/debian/rules.d/debhelper.mk     2006-04-11 19:12:43 UTC 
(rev 1414)
+++ glibc-package/trunk/debian/rules.d/debhelper.mk     2006-04-11 22:48:28 UTC 
(rev 1415)
@@ -186,6 +186,7 @@
          sed -e "s#DEB_HOST_ARCH#$(DEB_HOST_ARCH)#" -i $$z; \
          case $$z in \
            *.install) sed -e "s/^#.*//" -i $$z ;; \
+           debian/$(libc).preinst) l=`grep ^RTLDLIST= 
debian/tmp-libc/usr/bin/ldd | sed -e 's/^RTLDLIST=//'`; sed -e 
"s#RTLDLIST#$$l#" -i $$z ;; \
          esac; \
        done
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to