summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2005-06-13 15:01:41 +0000
committerLuca Barbato <lu_zero@gentoo.org>2005-06-13 15:01:41 +0000
commitb305609e1a8a82541b8baa633e66098d804bb3f4 (patch)
tree3794e0a13ba64acffea36003109b217a8ee8c276 /eclass/toolchain-binutils.eclass
parentversion bump (diff)
downloadhistorical-b305609e1a8a82541b8baa633e66098d804bb3f4.tar.gz
historical-b305609e1a8a82541b8baa633e66098d804bb3f4.tar.bz2
historical-b305609e1a8a82541b8baa633e66098d804bb3f4.zip
Vapier's correct fix to my ugly workaround
Diffstat (limited to 'eclass/toolchain-binutils.eclass')
-rw-r--r--eclass/toolchain-binutils.eclass10
1 files changed, 6 insertions, 4 deletions
diff --git a/eclass/toolchain-binutils.eclass b/eclass/toolchain-binutils.eclass
index ae74aa7b0b07..eff540fca15b 100644
--- a/eclass/toolchain-binutils.eclass
+++ b/eclass/toolchain-binutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.38 2005/06/13 10:18:05 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.39 2005/06/13 15:01:41 lu_zero Exp $
# We install binutils into CTARGET-VERSION specific directories. This lets
# us easily merge multiple versions for multiple targets (if we wish) and
@@ -237,8 +237,7 @@ toolchain-binutils_pkg_postinst() {
}
toolchain-binutils_pkg_postrm() {
- local choice=$(binutils-config -l | grep ${CTARGET} | grep -v ${CTARGET}-${PV})
- choice=${choice/\* }
+ local current_profile=$(binutils-config -c ${CTARGET})
# If no other versions exist, then uninstall for this
# target ... otherwise, switch to the newest version
@@ -246,7 +245,10 @@ toolchain-binutils_pkg_postrm() {
# rerun binutils-config if this is a remerge, as
# we want the mtimes on the symlinks updated (if
# it is the same as the current selected profile)
- if [[ ! -e ${BINPATH}/ld ]] ; then
+ if [[ ! -e ${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
if [[ -z ${choice} ]] ; then
binutils-config -u ${CTARGET}
else