/[gentoo-x86]/sys-libs/glibc/files/eblits/pkg_preinst.eblit
Gentoo

Diff of /sys-libs/glibc/files/eblits/pkg_preinst.eblit

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.7 Revision 1.8
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_preinst.eblit,v 1.7 2013/01/25 03:12:18 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_preinst.eblit,v 1.8 2013/02/09 05:39:21 vapier Exp $
4 4
5# Simple test to make sure our new glibc isnt completely broken. 5# Simple test to make sure our new glibc isnt completely broken.
6# Make sure we don't test with statically built binaries since 6# Make sure we don't test with statically built binaries since
7# they will fail. Also, skip if this glibc is a cross compiler. 7# they will fail. Also, skip if this glibc is a cross compiler.
8glibc_sanity_check() { 8glibc_sanity_check() {
9 cd / #228809 9 cd / #228809
10
11 # We also might have to search the gcc dir for things like libgcc_s.so #453760
12 local gccdir=$(ls -1rd /usr/lib/gcc/${CHOST}/*/ | head -1)
13 10
14 # We enter ${D} so to avoid trouble if the path contains 11 # We enter ${D} so to avoid trouble if the path contains
15 # special characters; for instance if the path contains the 12 # special characters; for instance if the path contains the
16 # colon character (:), then the linker will try to split it 13 # colon character (:), then the linker will try to split it
17 # and look for the libraries in an unexpected place. This can 14 # and look for the libraries in an unexpected place. This can
24 for x in date env ls true uname ; do 21 for x in date env ls true uname ; do
25 x=$(type -p ${x}) 22 x=$(type -p ${x})
26 [[ -z ${x} ]] && continue 23 [[ -z ${x} ]] && continue
27 striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue 24 striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
28 [[ ${striptest} == *"statically linked"* ]] && continue 25 [[ ${striptest} == *"statically linked"* ]] && continue
29 ./ld-*.so --library-path ".:${gccdir}" ${x} > /dev/null \ 26 ./ld-*.so --library-path . ${x} > /dev/null \
30 || die "simple run test (${x}) failed" 27 || die "simple run test (${x}) failed"
31 done 28 done
32 29
33 popd >/dev/null 30 popd >/dev/null
34} 31}

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20