Index: toolchain-binutils.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v retrieving revision 1.38 diff -u -p -r1.38 toolchain-binutils.eclass --- toolchain-binutils.eclass 13 Jun 2005 10:18:05 -0000 1.38 +++ toolchain-binutils.eclass 13 Jun 2005 13:06:01 -0000 @@ -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