diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-03-02 23:12:09 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-03-02 23:12:09 +0000 |
commit | e40df94e116c8553190a439c3a396b46540bb883 (patch) | |
tree | 512163dc243df6bc84f78fd0d32f5b217fd3815b /sys-devel/binutils-config | |
parent | Remove old. (diff) | |
download | gentoo-2-e40df94e116c8553190a439c3a396b46540bb883.tar.gz gentoo-2-e40df94e116c8553190a439c3a396b46540bb883.tar.bz2 gentoo-2-e40df94e116c8553190a439c3a396b46540bb883.zip |
Fix uninstall handling to work even after most files are removed.
(Portage version: 2.2.0_alpha86/cvs/Linux x86_64)
Diffstat (limited to 'sys-devel/binutils-config')
-rw-r--r-- | sys-devel/binutils-config/ChangeLog | 8 | ||||
-rw-r--r-- | sys-devel/binutils-config/binutils-config-3-r3.ebuild (renamed from sys-devel/binutils-config/binutils-config-3-r2.ebuild) | 2 | ||||
-rwxr-xr-x | sys-devel/binutils-config/files/binutils-config-3 | 16 |
3 files changed, 19 insertions, 7 deletions
diff --git a/sys-devel/binutils-config/ChangeLog b/sys-devel/binutils-config/ChangeLog index 627855c5558c..1dce5d598cda 100644 --- a/sys-devel/binutils-config/ChangeLog +++ b/sys-devel/binutils-config/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-devel/binutils-config # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/ChangeLog,v 1.52 2012/03/01 21:37:11 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/ChangeLog,v 1.53 2012/03/02 23:12:09 vapier Exp $ + +*binutils-config-3-r3 (02 Mar 2012) + + 02 Mar 2012; Mike Frysinger <vapier@gentoo.org> files/binutils-config-3, + -binutils-config-3-r2.ebuild, +binutils-config-3-r3.ebuild: + Fix uninstall handling to work even after most files are removed. *binutils-config-3-r2 (01 Mar 2012) diff --git a/sys-devel/binutils-config/binutils-config-3-r2.ebuild b/sys-devel/binutils-config/binutils-config-3-r3.ebuild index b126a0f0b3a1..0c497a0c75d2 100644 --- a/sys-devel/binutils-config/binutils-config-3-r2.ebuild +++ b/sys-devel/binutils-config/binutils-config-3-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/binutils-config-3-r2.ebuild,v 1.1 2012/03/01 21:37:11 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/binutils-config-3-r3.ebuild,v 1.1 2012/03/02 23:12:09 vapier Exp $ DESCRIPTION="Utility to change the binutils version being used" HOMEPAGE="http://www.gentoo.org/" diff --git a/sys-devel/binutils-config/files/binutils-config-3 b/sys-devel/binutils-config/files/binutils-config-3 index a402ef2ab8e6..78972bb09cfd 100755 --- a/sys-devel/binutils-config/files/binutils-config-3 +++ b/sys-devel/binutils-config/files/binutils-config-3 @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.7 2012/03/01 21:37:11 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.8 2012/03/02 23:12:09 vapier Exp $ # Format of /etc/env.d/binutils/: # config-TARGET: CURRENT=version for TARGET @@ -237,6 +237,8 @@ switch_profile() { } uninstall_target() { + : ${TARGET:=${UARG}} + if [[ ${TARGET} == ${HOST} ]] ; then die "refusing to uninstall native binutils" fi @@ -255,11 +257,15 @@ uninstall_target() { rm -f "${ENV_D}"/config-${TARGET} "${ROOT}"/etc/ld.so.conf.d/05binutils.conf # XXX: we still leave behind FAKE_TARGETS in /usr/bin ... + local x for x in addr2line ar as c++filt elf2flt flthdr gprof ld ld.real \ nm objcopy objdump ranlib readelf size strings strip ; do - rm -f "${ROOT}"/usr/bin/${TARGET}-${x} - rm -f "${ROOT}"/usr/{${HOST}/,}${TARGET}/bin/${x} - rm -f "${ROOT}"/usr/libexec/gcc/${TARGET}/${x} + x=( + "${ROOT}"/usr/bin/${TARGET}-${x} + "${ROOT}"/usr/{${HOST}/,}${TARGET}/bin/${x} + "${ROOT}"/usr/libexec/gcc/${TARGET}/${x} + ) + rm -f "${x[@]}" done for x in ansidecl.h bfd.h bfdlink.h dis-asm.h symcat.h ; do rm -f "${ROOT}"/usr/{${HOST}/,}${TARGET}/{usr/,}include/${x} @@ -405,7 +411,7 @@ while [[ $# -gt 0 ]] ; do -h|--help) usage 0 ;; -V|--version) unset Header - cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.7 2012/03/01 21:37:11 vapier Exp $" + cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.8 2012/03/02 23:12:09 vapier Exp $" cvsver=${cvsver##*binutils-config-} bver=${cvsver%%,v *} cvsver=${cvsver#* } |