public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-devel/binutils-config/files: binutils-config-3
@ 2011-08-12 20:30 Mike Frysinger (vapier)
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger (vapier) @ 2011-08-12 20:30 UTC (permalink / raw
  To: gentoo-commits

vapier      11/08/12 20:30:20

  Modified:             binutils-config-3
  Log:
  Also support linker switching for current profile, and add some helpful user output so they can see what is going on.
  
  (Portage version: 2.2.0_alpha46/cvs/Linux x86_64)

Revision  Changes    Path
1.2                  sys-devel/binutils-config/files/binutils-config-3

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?r1=1.1&r2=1.2

Index: binutils-config-3
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- binutils-config-3	12 Aug 2011 20:26:09 -0000	1.1
+++ binutils-config-3	12 Aug 2011 20:30:20 -0000	1.2
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2011 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.1 2011/08/12 20:26:09 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.2 2011/08/12 20:30:20 vapier Exp $
 
 # Format of /etc/env.d/binutils/:
 #  config-TARGET:	CURRENT=version for TARGET
@@ -343,7 +343,9 @@
 	fi
 
 	# switch it up
+	ebegin "Setting default linker to ${ld} for ${PROFILE}"
 	ln -sf ld.${ld} "${BINPATH}"/ld
+	eend $?
 }
 switch_linker_gold() { switch_linker gold ; }
 switch_linker_bfd() { switch_linker bfd ; }
@@ -387,7 +389,7 @@
 		-h|--help)                 usage 0 ;;
 		-V|--version)
 			unset Header
-			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.1 2011/08/12 20:26:09 vapier Exp $"
+			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.2 2011/08/12 20:30:20 vapier Exp $"
 			cvsver=${cvsver##*binutils-config-}
 			bver=${cvsver%%,v *}
 			cvsver=${cvsver#* }
@@ -432,7 +434,7 @@
 case ${DOIT} in
 switch_profile|switch_linker_*)
 	# decode user's profile choice
-	x=${UARG}
+	x=${UARG:-$(TARGET=${HOST} set_current_profile)}
 	PROFILE=""
 	if [[ -z $(echo ${x} | tr -d '[:digit:]') ]] ; then
 		# User gave us a # representing the profile






^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-devel/binutils-config/files: binutils-config-3
@ 2011-08-23 16:09 Mike Frysinger (vapier)
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger (vapier) @ 2011-08-23 16:09 UTC (permalink / raw
  To: gentoo-commits

vapier      11/08/23 16:09:21

  Modified:             binutils-config-3
  Log:
  Make sure all the profile specs still work after previous rework.
  
  (Portage version: 2.2.0_alpha51/cvs/Linux x86_64)

Revision  Changes    Path
1.4                  sys-devel/binutils-config/files/binutils-config-3

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?r1=1.3&r2=1.4

Index: binutils-config-3
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- binutils-config-3	12 Aug 2011 20:34:00 -0000	1.3
+++ binutils-config-3	23 Aug 2011 16:09:21 -0000	1.4
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2011 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.3 2011/08/12 20:34:00 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.4 2011/08/23 16:09:21 vapier Exp $
 
 # Format of /etc/env.d/binutils/:
 #  config-TARGET:	CURRENT=version for TARGET
@@ -389,7 +389,7 @@
 		-h|--help)                 usage 0 ;;
 		-V|--version)
 			unset Header
-			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.3 2011/08/12 20:34:00 vapier Exp $"
+			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.4 2011/08/23 16:09:21 vapier Exp $"
 			cvsver=${cvsver##*binutils-config-}
 			bver=${cvsver%%,v *}
 			cvsver=${cvsver#* }
@@ -453,18 +453,24 @@
 	if [[ -z ${PROFILE} ]] ; then
 		# User gave us a full HOST-ver
 		x=${x##*/}
-		if [[ ! -f ${ENV_D}/${x} ]] && [[ ! -f ${ENV_D}/config-${x} ]] ; then
-			# Maybe they just gave us a ver ...
-			if [[ -f ${ENV_D}/${HOST}-${x} ]] ; then
-				x=${HOST}-${x}
-			else
-				eerror "${argv0}: Could not locate '$x' in '${ENV_D}/'!"
-				exit 1
-			fi
+		if [[ -f ${ENV_D}/${x} ]] ; then
+			# Valid HOST-ver yeah!
 			PROFILE=${x}
 		else
-			# Maybe they just gave us a target ... pick active profile
-			PROFILE=$(TARGET=${x} set_current_profile)
+			# Not a valid HOST-ver ...
+			if [[ ! -f ${ENV_D}/config-${x} ]] ; then
+				# Maybe they just gave us a ver ...
+				if [[ -f ${ENV_D}/${HOST}-${x} ]] ; then
+					x=${HOST}-${x}
+				else
+					eerror "${argv0}: Could not locate '$x' in '${ENV_D}/'!"
+					exit 1
+				fi
+				PROFILE=${x}
+			else
+				# Maybe they just gave us a target ... pick active profile
+				PROFILE=$(TARGET=${x} set_current_profile)
+			fi
 		fi
 	fi
 	;;






^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-devel/binutils-config/files: binutils-config-3
@ 2011-08-29  0:56 Mike Frysinger (vapier)
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger (vapier) @ 2011-08-29  0:56 UTC (permalink / raw
  To: gentoo-commits

vapier      11/08/29 00:56:46

  Modified:             binutils-config-3
  Log:
  Make profile switching more atomic #380759.
  
  (Portage version: 2.2.0_alpha51/cvs/Linux x86_64)

Revision  Changes    Path
1.5                  sys-devel/binutils-config/files/binutils-config-3

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?r1=1.4&r2=1.5

Index: binutils-config-3
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- binutils-config-3	23 Aug 2011 16:09:21 -0000	1.4
+++ binutils-config-3	29 Aug 2011 00:56:46 -0000	1.5
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2011 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.4 2011/08/23 16:09:21 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.5 2011/08/29 00:56:46 vapier Exp $
 
 # Format of /etc/env.d/binutils/:
 #  config-TARGET:	CURRENT=version for TARGET
@@ -59,6 +59,26 @@
 		mv -f "$1" "$2"
 	fi
 }
+atomic_ln() {
+	local target=$1 linkdir=$2 linkname=$3 linktmp linkfull
+	linktmp="${linkdir}/.binutils-config.tmp.${linkname}"
+	linkfull="${linkdir}/${linkname}"
+	if [[ -d ${linkfull} ]] ; then
+		# if linking to a dir, we need a little magic to
+		# make it atomic since `mv -T` is not portable
+		rm -rf "${linktmp}"
+		mkdir -p "${linktmp}"
+		ln -sf "${target}" "${linktmp}/${linkname}"
+		mv "${linktmp}/${linkname}" "${linktmp}/../"
+		rmdir "${linktmp}"
+	else
+		# `ln` will expand into unlink();symlink(); which
+		# is not atomic for a small amount of time, but
+		# `mv` is a single rename() call
+		ln -sf "${target}" "${linktmp}"
+		mv "${linktmp}" "${linkfull}"
+	fi
+}
 
 setup_env() {
 	unset TARGET VER LIBPATH FAKE_TARGETS
@@ -122,14 +142,14 @@
 	cd "${ROOT}/${BINPATH}" || exit 1
 	mkdir -p "${ROOT}/${BINPATH_LINKS}" "${ROOT}/usr/bin"
 	for x in * ; do
-		ln -sf "${BINPATH}/${x}" "${ROOT}/${BINPATH_LINKS}/${x}"
-		ln -sf "${BINPATH_LINKS}/${x}" "${ROOT}"/usr/bin/${TARGET}-${x}
+		atomic_ln "${BINPATH}/${x}" "${ROOT}/${BINPATH_LINKS}" "${x}"
+		atomic_ln "${BINPATH_LINKS}/${x}" "${ROOT}/usr/bin/" "${TARGET}-${x}"
 		for fake in ${FAKE_TARGETS} ; do
 			[[ -f ${ENV_D}/config-${fake} ]] && continue
-			ln -sf "${BINPATH_LINKS}/${x}" "${ROOT}"/usr/bin/${fake}-${x}
+			atomic_ln "${BINPATH_LINKS}/${x}" "${ROOT}/usr/bin" "${fake}-${x}"
 		done
 		if [[ ${TARGET} == ${HOST} ]] ; then
-			ln -sf ${TARGET}-${x} "${ROOT}"/usr/bin/${x}
+			atomic_ln "${TARGET}-${x}" "${ROOT}/usr/bin" "${x}"
 		fi
 	done
 
@@ -147,12 +167,12 @@
 		rmdir "${ROOT}"/usr/${TARGET}/lib >& /dev/null
 	fi
 	# When upgrading, we need to clean up ldscripts and libs
-	rm -rf "${dstlib}/ldscripts" "${ROOT}/${BINPATH_LINKS}"/ldscripts
 	mkdir -p "${dstlib}"
-	ln -sf "${LIBPATH}/ldscripts" "${dstlib}"/ldscripts
-	find -L "${dstlib}" -type l -exec rm {} +
+	rm -rf "${ROOT}/${BINPATH_LINKS}"/ldscripts
+	atomic_ln "${LIBPATH}/ldscripts" "${dstlib}" "ldscripts"
+	find -L "${dstlib}" -type l -exec rm -v {} +
 	for x in lib* ; do
-		ln -sf "${LIBPATH}/${x}" "${dstlib}/${x}"
+		atomic_ln "${LIBPATH}/${x}" "${dstlib}" "${x}"
 	done
 
 	#
@@ -164,7 +184,7 @@
 		if [[ ${HOST} == ${TARGET} ]] ; then
 			mkdir -p "${ROOT}/usr/include"
 			for x in * ; do
-				ln -sf "${INCPATH}/${x}" "${ROOT}/usr/include/${x}"
+				atomic_ln "${INCPATH}/${x}" "${ROOT}/usr/include" "${x}"
 			done
 		else
 			# Clean out old path -- cannot use '-exec {} +' syntax here
@@ -337,14 +357,14 @@
 	setup_env || return 1
 
 	# does this binutils even support the requested linker ?
-	if [[ ! -e ${BINPATH}/ld.${ld} ]] ; then
+	if [[ ! -e ${ROOT}/${BINPATH}/ld.${ld} ]] ; then
 		eerror "${argv0}: sorry, but ${PROFILE} doesn't support the ${ld} linker"
 		exit 1
 	fi
 
 	# switch it up
 	ebegin "Setting default linker to ${ld} for ${PROFILE}"
-	ln -sf ld.${ld} "${BINPATH}"/ld
+	atomic_ln ld.${ld} "${ROOT}/${BINPATH}" ld
 	eend $?
 }
 switch_linker_gold() { switch_linker gold ; }
@@ -389,7 +409,7 @@
 		-h|--help)                 usage 0 ;;
 		-V|--version)
 			unset Header
-			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.4 2011/08/23 16:09:21 vapier Exp $"
+			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.5 2011/08/29 00:56:46 vapier Exp $"
 			cvsver=${cvsver##*binutils-config-}
 			bver=${cvsver%%,v *}
 			cvsver=${cvsver#* }






^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-devel/binutils-config/files: binutils-config-3
@ 2011-09-29 20:26 Mike Frysinger (vapier)
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger (vapier) @ 2011-09-29 20:26 UTC (permalink / raw
  To: gentoo-commits

vapier      11/09/29 20:26:56

  Modified:             binutils-config-3
  Log:
  Make linker switching more general, and add a `die` helper.
  
  (Portage version: 2.2.0_alpha59/cvs/Linux x86_64)

Revision  Changes    Path
1.6                  sys-devel/binutils-config/files/binutils-config-3

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?r1=1.5&r2=1.6

Index: binutils-config-3
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- binutils-config-3	29 Aug 2011 00:56:46 -0000	1.5
+++ binutils-config-3	29 Sep 2011 20:26:56 -0000	1.6
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2011 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.5 2011/08/29 00:56:46 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.6 2011/09/29 20:26:56 vapier Exp $
 
 # Format of /etc/env.d/binutils/:
 #  config-TARGET:	CURRENT=version for TARGET
@@ -21,6 +21,7 @@
 	exit 1
 }
 esyslog() { :; }
+die() { eerror "${argv0}: $*"; exit 1; }
 umask 022
 
 usage() {
@@ -34,8 +35,7 @@
   ${GOOD}-d, --debug${NORMAL}                Execute with debug output
 
 ${HILITE}General Cruft:${NORMAL}
-  ${GOOD}--gold${NORMAL}                     Switch linker to gold (if supported)
-  ${GOOD}--bfd${NORMAL}                      Switch linker to [older] bfd (if supported)
+  ${GOOD}--linker${NORMAL} <linker>          Switch to specified linker (if supported)
 
 ${HILITE}Arch Specific Cruft:${NORMAL}
   ${GOOD}--amd64${NORMAL}                    Install extra amd64 links (x86_64)
@@ -241,8 +241,7 @@
 
 uninstall_target() {
 	if [[ ${TARGET} == ${HOST} ]] ; then
-		eerror "${argv0}: Refusing to uninstall native binutils"
-		exit 1
+		die "refusing to uninstall native binutils"
 	fi
 
 	shopt -s nullglob
@@ -253,8 +252,7 @@
 		rm -f "${ENV_D}"/${PROFILE}
 	done
 	if [[ -z ${PROFILE} ]] && [[ ! -e ${ENV_D}/config-${TARGET} ]] ; then
-		eerror "${argv0}: No profiles exist for '${TARGET}'"
-		exit 1
+		die "no profiles exist for '${TARGET}'"
 	fi
 
 	rm -f "${ENV_D}"/config-${TARGET} "${ROOT}"/etc/ld.so.conf.d/05binutils.conf
@@ -352,23 +350,26 @@
 }
 
 switch_linker() {
-	local ld=$1
+	local bpath ld=$1
+
+	case ${ld} in
+	ld.*) ;;
+	*) die "not supported: linker must start with 'ld.'" ;;
+	esac
 
 	setup_env || return 1
+	bpath="${ROOT}/${BINPATH}"
 
 	# does this binutils even support the requested linker ?
-	if [[ ! -e ${ROOT}/${BINPATH}/ld.${ld} ]] ; then
-		eerror "${argv0}: sorry, but ${PROFILE} doesn't support the ${ld} linker"
-		exit 1
+	if [[ ! -e ${bpath}/${ld} ]] ; then
+		die "sorry, but ${PROFILE} doesn't support the ${ld} linker"
 	fi
 
 	# switch it up
 	ebegin "Setting default linker to ${ld} for ${PROFILE}"
-	atomic_ln ld.${ld} "${ROOT}/${BINPATH}" ld
+	atomic_ln ${ld} "${bpath}" ld
 	eend $?
 }
-switch_linker_gold() { switch_linker gold ; }
-switch_linker_bfd() { switch_linker bfd ; }
 
 set_HOST() {
 	# Set HOST to CHOST if it isn't already set
@@ -391,8 +392,7 @@
 		NEED_ACTION="no"
 		DOIT=$1
 	else
-		eerror "${argv0}: one action at a time!"
-		exit 1
+		die "one action at a time!"
 	fi
 }
 
@@ -401,15 +401,14 @@
 	shift
 	case ${x} in
 		-c|--get-current-profile)  select_action get_current_profile ;;
-		-l|--list-profiles)        select_action list_profiles ;;
+		-l|--list|--list-profiles) select_action list_profiles ;;
 		-u|--uninstall)            select_action uninstall_target ;;
-		--gold)                    select_action switch_linker_gold ;;
-		--bfd)                     select_action switch_linker_bfd ;;
+		--linker)                  select_action "switch_linker $1"; shift ;;
 		-d|--debug)                DEBUG="yes" ;;
 		-h|--help)                 usage 0 ;;
 		-V|--version)
 			unset Header
-			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.5 2011/08/29 00:56:46 vapier Exp $"
+			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.6 2011/09/29 20:26:56 vapier Exp $"
 			cvsver=${cvsver##*binutils-config-}
 			bver=${cvsver%%,v *}
 			cvsver=${cvsver#* }
@@ -429,13 +428,11 @@
 			fi
 			;;
 		-*)
-			eerror "${0##*/}: Invalid switch!  Try '--help'."
-			exit 1
+			die "invalid switch!  Try '--help'."
 			;;
 		*)
 			if [[ ${UARG+set} == "set" ]] ; then
-				eerror "${argv0}: only one profile/target at a time please"
-				exit 1
+				die "only one profile/target at a time please"
 			fi
 			NEED_ACTION="maybe"
 			UARG=${x}
@@ -483,8 +480,7 @@
 				if [[ -f ${ENV_D}/${HOST}-${x} ]] ; then
 					x=${HOST}-${x}
 				else
-					eerror "${argv0}: Could not locate '$x' in '${ENV_D}/'!"
-					exit 1
+					die "could not locate '$x' in '${ENV_D}/'!"
 				fi
 				PROFILE=${x}
 			else






^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-devel/binutils-config/files: binutils-config-3
@ 2012-03-01 21:37 Mike Frysinger (vapier)
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger (vapier) @ 2012-03-01 21:37 UTC (permalink / raw
  To: gentoo-commits

vapier      12/03/01 21:37:11

  Modified:             binutils-config-3
  Log:
  Drop old upgrade logic that is only there for systems 4.5+ years old as it is causing issues with newer ones, and 4.5+ upgrade time is plenty #381633 by Tim Harder.
  
  (Portage version: 2.2.0_alpha86/cvs/Linux x86_64)

Revision  Changes    Path
1.7                  sys-devel/binutils-config/files/binutils-config-3

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?r1=1.6&r2=1.7

Index: binutils-config-3
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- binutils-config-3	29 Sep 2011 20:26:56 -0000	1.6
+++ binutils-config-3	1 Mar 2012 21:37:11 -0000	1.7
@@ -1,7 +1,7 @@
 #!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
+# 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.6 2011/09/29 20:26:56 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.7 2012/03/01 21:37:11 vapier Exp $
 
 # Format of /etc/env.d/binutils/:
 #  config-TARGET:	CURRENT=version for TARGET
@@ -162,9 +162,6 @@
 		dstlib=${ROOT}/usr/${HOST}/lib
 	else
 		dstlib=${ROOT}/usr/${HOST}/${TARGET}/lib
-		# Clean out old path
-		rm -rf "${ROOT}"/usr/${TARGET}/lib/ldscripts
-		rmdir "${ROOT}"/usr/${TARGET}/lib >& /dev/null
 	fi
 	# When upgrading, we need to clean up ldscripts and libs
 	mkdir -p "${dstlib}"
@@ -408,7 +405,7 @@
 		-h|--help)                 usage 0 ;;
 		-V|--version)
 			unset Header
-			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.6 2011/09/29 20:26:56 vapier Exp $"
+			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=${cvsver##*binutils-config-}
 			bver=${cvsver%%,v *}
 			cvsver=${cvsver#* }






^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-devel/binutils-config/files: binutils-config-3
@ 2012-03-02 23:12 Mike Frysinger (vapier)
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger (vapier) @ 2012-03-02 23:12 UTC (permalink / raw
  To: gentoo-commits

vapier      12/03/02 23:12:09

  Modified:             binutils-config-3
  Log:
  Fix uninstall handling to work even after most files are removed.
  
  (Portage version: 2.2.0_alpha86/cvs/Linux x86_64)

Revision  Changes    Path
1.8                  sys-devel/binutils-config/files/binutils-config-3

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?r1=1.7&r2=1.8

Index: binutils-config-3
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- binutils-config-3	1 Mar 2012 21:37:11 -0000	1.7
+++ binutils-config-3	2 Mar 2012 23:12:09 -0000	1.8
@@ -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 @@
 }
 
 uninstall_target() {
+	: ${TARGET:=${UARG}}
+
 	if [[ ${TARGET} == ${HOST} ]] ; then
 		die "refusing to uninstall native binutils"
 	fi
@@ -255,11 +257,15 @@
 	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 @@
 		-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#* }






^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-devel/binutils-config/files: binutils-config-3
@ 2012-08-18  3:57 Mike Frysinger (vapier)
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger (vapier) @ 2012-08-18  3:57 UTC (permalink / raw
  To: gentoo-commits

vapier      12/08/18 03:57:50

  Modified:             binutils-config-3
  Log:
  Fix relative ROOT handling #431104 by Greg Turner.
  
  (Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

Revision  Changes    Path
1.9                  sys-devel/binutils-config/files/binutils-config-3

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?r1=1.8&r2=1.9

Index: binutils-config-3
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- binutils-config-3	2 Mar 2012 23:12:09 -0000	1.8
+++ binutils-config-3	18 Aug 2012 03:57:50 -0000	1.9
@@ -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.8 2012/03/02 23:12:09 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.9 2012/08/18 03:57:50 vapier Exp $
 
 # Format of /etc/env.d/binutils/:
 #  config-TARGET:	CURRENT=version for TARGET
@@ -9,7 +9,7 @@
 
 : ${ROOT:=/}
 [[ ${ROOT} != */ ]] && ROOT="${ROOT}/"
-[[ ${ROOT} != /* ]] && ROOT="${PWD}${ROOT}"
+[[ ${ROOT} != /* ]] && ROOT="${PWD%/}/${ROOT}"
 
 cd /
 
@@ -411,7 +411,7 @@
 		-h|--help)                 usage 0 ;;
 		-V|--version)
 			unset Header
-			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="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.9 2012/08/18 03:57:50 vapier Exp $"
 			cvsver=${cvsver##*binutils-config-}
 			bver=${cvsver%%,v *}
 			cvsver=${cvsver#* }





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-devel/binutils-config/files: binutils-config-3
@ 2012-11-18  7:54 Mike Frysinger (vapier)
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger (vapier) @ 2012-11-18  7:54 UTC (permalink / raw
  To: gentoo-commits

vapier      12/11/18 07:54:46

  Modified:             binutils-config-3
  Log:
  Add elfedit and ld.{bfd,gold} to uninstall list.
  
  (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)

Revision  Changes    Path
1.10                 sys-devel/binutils-config/files/binutils-config-3

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?r1=1.9&r2=1.10

Index: binutils-config-3
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- binutils-config-3	18 Aug 2012 03:57:50 -0000	1.9
+++ binutils-config-3	18 Nov 2012 07:54:46 -0000	1.10
@@ -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.9 2012/08/18 03:57:50 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.10 2012/11/18 07:54:46 vapier Exp $
 
 # Format of /etc/env.d/binutils/:
 #  config-TARGET:	CURRENT=version for TARGET
@@ -258,8 +258,11 @@
 
 	# 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
+	for x in \
+		addr2line ar as c++filt elf2flt elfedit flthdr gprof \
+		ld ld.{bfd,gold,real} \
+		nm objcopy objdump ranlib readelf size strings strip
+	do
 		x=(
 			"${ROOT}"/usr/bin/${TARGET}-${x}
 			"${ROOT}"/usr/{${HOST}/,}${TARGET}/bin/${x}
@@ -411,7 +414,7 @@
 		-h|--help)                 usage 0 ;;
 		-V|--version)
 			unset Header
-			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.9 2012/08/18 03:57:50 vapier Exp $"
+			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.10 2012/11/18 07:54:46 vapier Exp $"
 			cvsver=${cvsver##*binutils-config-}
 			bver=${cvsver%%,v *}
 			cvsver=${cvsver#* }





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-devel/binutils-config/files: binutils-config-3
@ 2013-05-05  5:20 Mike Frysinger (vapier)
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger (vapier) @ 2013-05-05  5:20 UTC (permalink / raw
  To: gentoo-commits

vapier      13/05/05 05:20:42

  Modified:             binutils-config-3
  Log:
  Also try to rmdir target bin/libexec paths when uninstalling.
  
  (Portage version: 2.2.0_alpha170/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)

Revision  Changes    Path
1.11                 sys-devel/binutils-config/files/binutils-config-3

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3?r1=1.10&r2=1.11

Index: binutils-config-3
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- binutils-config-3	18 Nov 2012 07:54:46 -0000	1.10
+++ binutils-config-3	5 May 2013 05:20:42 -0000	1.11
@@ -1,7 +1,7 @@
 #!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 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.10 2012/11/18 07:54:46 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.11 2013/05/05 05:20:42 vapier Exp $
 
 # Format of /etc/env.d/binutils/:
 #  config-TARGET:	CURRENT=version for TARGET
@@ -284,6 +284,8 @@
 		"${destdir}"/{bin,include,lib,usr} \
 		"${destdir}" \
 		"${ROOT}"/var/db/pkg/cross-${TARGET} \
+		"${ROOT}"/usr/{${HOST}/,}${TARGET}/bin \
+		"${ROOT}"/usr/libexec/gcc/${TARGET} \
 		2>/dev/null
 
 	rm -f "${ENV_D}"/${TARGET}-*
@@ -414,7 +416,7 @@
 		-h|--help)                 usage 0 ;;
 		-V|--version)
 			unset Header
-			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.10 2012/11/18 07:54:46 vapier Exp $"
+			cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.11 2013/05/05 05:20:42 vapier Exp $"
 			cvsver=${cvsver##*binutils-config-}
 			bver=${cvsver%%,v *}
 			cvsver=${cvsver#* }





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-05-05  5:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 23:12 [gentoo-commits] gentoo-x86 commit in sys-devel/binutils-config/files: binutils-config-3 Mike Frysinger (vapier)
  -- strict thread matches above, loose matches on Subject: below --
2013-05-05  5:20 Mike Frysinger (vapier)
2012-11-18  7:54 Mike Frysinger (vapier)
2012-08-18  3:57 Mike Frysinger (vapier)
2012-03-01 21:37 Mike Frysinger (vapier)
2011-09-29 20:26 Mike Frysinger (vapier)
2011-08-29  0:56 Mike Frysinger (vapier)
2011-08-23 16:09 Mike Frysinger (vapier)
2011-08-12 20:30 Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox