summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@gentoo.org>2001-12-08 15:59:02 +0000
committerDaniel Robbins <drobbins@gentoo.org>2001-12-08 15:59:02 +0000
commit4ef95117f84c852f73ecbf42c447966fef07e050 (patch)
treefbaac14d42618d8e40baf151bac3c5ad3336158a /sys-libs/glibc
parentadded --enable-final. this speeds up compile times by as much as 30% or more!... (diff)
downloadgentoo-2-4ef95117f84c852f73ecbf42c447966fef07e050.tar.gz
gentoo-2-4ef95117f84c852f73ecbf42c447966fef07e050.tar.bz2
gentoo-2-4ef95117f84c852f73ecbf42c447966fef07e050.zip
a new glibc with a hopefully fixed pkg_preinst()
Diffstat (limited to 'sys-libs/glibc')
-rw-r--r--sys-libs/glibc/glibc-2.2.4-r4.ebuild42
1 files changed, 23 insertions, 19 deletions
diff --git a/sys-libs/glibc/glibc-2.2.4-r4.ebuild b/sys-libs/glibc/glibc-2.2.4-r4.ebuild
index 69f9531a6294..be78de924c06 100644
--- a/sys-libs/glibc/glibc-2.2.4-r4.ebuild
+++ b/sys-libs/glibc/glibc-2.2.4-r4.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Maintainer: Daniel Robbins <drobbins@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.2.4-r4.ebuild,v 1.2 2001/12/07 19:15:45 drobbins Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.2.4-r4.ebuild,v 1.3 2001/12/08 15:59:02 drobbins Exp $
S=${WORKDIR}/${P}
DESCRIPTION="GNU libc6 (also called glibc2) C library"
@@ -118,34 +118,38 @@ src_install() {
pkg_preinst()
{
- # Check if we run under X
- if [ -e /usr/X11R6/bin/X ] && [ "`/sbin/pidof /usr/X11R6/bin/X`" ] && [ "${ROOT}" = "/" ]
- then
- echo "glibc can not be installed while X is running!!"
- exit 1
- fi
-
- echo "Saving ld-linux,libc6 and libpthread"
+ local mytarget
+ echo "Backing up existing critical libraries..."
+ [ ! -d ${ROOT}lib/old ] && mkdir ${ROOT}lib/old
for file in ld-linux.so.2 libc.so.6 libpthread.so.0
do
if [ -f ${ROOT}lib/${file} ]
then
- /bin/cp ${ROOT}lib/${file} ${ROOT}tmp
- /sbin/sln ${ROOT}tmp/${file} ${ROOT}lib/${file}
+ #all this "mytarget" stuff allows us to create a backup
+ #library in /lib/old with the *real* version name
+ #rather than the *generic* version name.
+
+ mytarget="`readlink ${ROOT}lib/${file}`"
+ mytarget="`basename $mytarget`"
+ /bin/cp ${ROOT}lib/${file} ${ROOT}lib/old/${mytarget}
+ /sbin/sln ${ROOT}lib/old/${mytarget} ${ROOT}lib/${file}
fi
done
- [ ! -e ${ROOT}etc/localtime ] && echo "Please remember to set your timezone using the zic command."
+ [ ! -e ${ROOT}etc/localtime ] && echo "Please remember to set your timezone using the zic command."
+ return 0
}
pkg_postinst()
{
- echo "Setting ld-linux,libc6 and libpthread"
- /sbin/sln ${ROOT}lib/ld-${PV}.so ${ROOT}lib/ld-linux.so.2
- /sbin/sln ${ROOT}lib/libc-${PV}.so ${ROOT}lib/libc.so.6
- /sbin/sln ${ROOT}lib/libpthread-0.9.so ${ROOT}lib/libpthread.so.0
- /bin/rm -f ${ROOT}tmp/ld-linux.so.2
- /bin/rm -f ${ROOT}tmp/libc.so.6
- /bin/rm -f ${ROOT}tmp/libpthread.so.0
+ /sbin/sln ld-${PV}.so ${ROOT}lib/ld-linux.so.2
+ /sbin/sln libc-${PV}.so ${ROOT}lib/libc.so.6
+ /sbin/sln libpthread-0.9.so ${ROOT}lib/libpthread.so.0
+ #we used to delete the backup libraries; we don't do this anymore.
+ #other apps may still have them mapped into their address space,
+ #but this shouldn't be a problem. The main reason is if something
+ #goes wrong with the new lib install. It's just a nicer way of
+ #handling things, imho.
/sbin/ldconfig -r ${ROOT}
+ return 0
}