Allow people to select profiles via version only.
authorMike Frysinger <vapier@gentoo.org>
Sun, 20 Nov 2005 17:48:48 +0000 (17:48 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sun, 20 Nov 2005 17:48:48 +0000 (17:48 +0000)
Package-Manager: portage-2.0.53_rc7

sys-devel/binutils-config/ChangeLog
sys-devel/binutils-config/Manifest
sys-devel/binutils-config/binutils-config-1.8-r6.ebuild [moved from sys-devel/binutils-config/binutils-config-1.8-r5.ebuild with 84% similarity]
sys-devel/binutils-config/files/binutils-config-1.8
sys-devel/binutils-config/files/digest-binutils-config-1.8-r6 [moved from sys-devel/binutils-config/files/digest-binutils-config-1.8-r5 with 100% similarity]

index 6bb9c88f7de60c7eec3992d906dd3db1b00fbd62..f4b1640221d1f9411b52666c0036d9805efdd942 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for sys-devel/binutils-config
 # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/ChangeLog,v 1.17 2005/08/27 05:34:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/ChangeLog,v 1.18 2005/11/20 17:48:48 vapier Exp $
+
+*binutils-config-1.8-r6 (20 Nov 2005)
+
+  20 Nov 2005; Mike Frysinger <vapier@gentoo.org> files/binutils-config-1.8,
+  -binutils-config-1.8-r5.ebuild, +binutils-config-1.8-r6.ebuild:
+  Allow people to select profiles via version only.
 
 *binutils-config-1.8-r5 (27 Aug 2005)
 
index 9396df6a4eb3520f0f01b3c30e0c20a91d353795..db265c447b85dcc718864c3b361037c1875c1423 100644 (file)
@@ -1,16 +1,16 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
-MD5 fe25e68c56d33822a393dad2099a6425 binutils-config-1.8-r5.ebuild 577
-MD5 dd789e541f40e4f34b7ea83258e6ec8a ChangeLog 3195
+MD5 a3e9a0aa09d957e2b33dff7ceb210d1c ChangeLog 3430
+MD5 0e31c1486a2559fd48120d5f263dbbec binutils-config-1.8-r6.ebuild 562
+MD5 ef63d7e1a955a5461bea2a9094a385c1 files/binutils-config-1.8 9796
 MD5 953efbc2a688428dfb75ecfa3c2d3d43 files/binutils-config.8 2989
-MD5 0094469d5d87417a29410741a4d1c64a files/binutils-config-1.8 9600
-MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-binutils-config-1.8-r5 0
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-binutils-config-1.8-r6 0
+MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.2 (GNU/Linux)
 
-iD8DBQFDD/tlgIKl8Uu19MoRAvSiAJ9HC87MAo5pGmmoZrwpehvbws4w3gCeNL1u
-428Vd4Op2/47j+0/v4NbPwI=
-=sQkl
+iD8DBQFDgLdigIKl8Uu19MoRAoW5AJ9zwvPt7j5co+k4ojMjkWhXep6hzQCcCCHh
+KQJUgtb9a9v7Gmggio4gkdU=
+=atr+
 -----END PGP SIGNATURE-----
similarity index 84%
rename from sys-devel/binutils-config/binutils-config-1.8-r5.ebuild
rename to sys-devel/binutils-config/binutils-config-1.8-r6.ebuild
index 77b49c4fb2ea0d9f2ffbb23f2e4056b0a2e72041..fd17211be2e402b83e8d89b79d18812de47411a3 100644 (file)
@@ -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/sys-devel/binutils-config/binutils-config-1.8-r5.ebuild,v 1.1 2005/08/27 05:34:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/binutils-config-1.8-r6.ebuild,v 1.1 2005/11/20 17:48:48 vapier Exp $
 
 DESCRIPTION="Utility to change the binutils version being used"
 HOMEPAGE="http://www.gentoo.org/"
@@ -11,7 +11,7 @@ SLOT="0"
 KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86"
 IUSE=""
 
-DEPEND="app-shells/bash"
+DEPEND=""
 
 src_install() {
        newbin "${FILESDIR}"/${PN}-${PV} ${PN} || die
index 8b10117a5941088e3131415e26663c74c5817951..f5e396f7ac1d711bdd803c3e2c1a4c8717e5e2ad 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2005 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-1.8,v 1.6 2005/08/27 05:34:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.8,v 1.7 2005/11/20 17:48:48 vapier Exp $
 
 # Format of /etc/env.d/binutils/:
 #  config-TARGET:      CURRENT=version for TARGET
@@ -249,6 +249,16 @@ list_profiles() {
        done
 }
 
+set_HOST() {
+       [[ -n ${HOST} ]] && return 0
+
+       if [[ -z ${CHOST} ]] ; then
+               HOST=$(portageq envvar CHOST)
+       else
+               HOST=${CHOST}
+       fi
+}
+
 [[ -z ${ROOT} ]] && ROOT="/"
 ENV_D="${ROOT}etc/env.d/binutils"
 
@@ -257,6 +267,7 @@ NEED_ACTION="yes"
 DOIT="switch_profile"
 PROFILE=""
 FAKE_TARGETS_USER=""
+HOST=""
 
 while [[ $# -gt 0 ]] ; do
        x=$1
@@ -290,7 +301,7 @@ while [[ $# -gt 0 ]] ; do
                        exit 0
                        ;;
                -v|--version)
-                       cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.8,v 1.6 2005/08/27 05:34:12 vapier Exp $"
+                       cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.8,v 1.7 2005/11/20 17:48:48 vapier Exp $"
                        cvsver=${cvsver##*binutils-config-}
                        echo "binutils-config-${cvsver%%,v *}"
                        exit 0
@@ -335,8 +346,14 @@ while [[ $# -gt 0 ]] ; do
                                # User gave us a full HOST-ver
                                x=${x##*/}
                                if [[ ! -f ${ENV_D}/${x} ]] && [[ ! -f ${ENV_D}/config-${x} ]] ; then
-                                       eerror "$0: Could not locate '$x' in '${ENV_D}/'!"
-                                       exit 1
+                                       # Maybe they just gave us a ver ...
+                                       set_HOST
+                                       if [[ -f ${ENV_D}/${HOST}-${x} ]] ; then
+                                               x=${HOST}-${x}
+                                       else
+                                               eerror "$0: Could not locate '$x' in '${ENV_D}/'!"
+                                               exit 1
+                                       fi
                                fi
                                PROFILE=${x}
                                NEED_ACTION="no"
@@ -348,13 +365,7 @@ done
 [[ ${NEED_ACTION} == "yes" ]] && usage && exit 1
 [[ ${DEBUG} == "yes" ]] && set -x
 
-if [[ ${DOIT} != "list_profiles" ]] ; then
-       if [[ -z ${CHOST} ]] ; then
-               HOST=$(portageq envvar CHOST)
-       else
-               HOST=${CHOST}
-       fi
-fi
+[[ ${DOIT} != "list_profiles" ]] && set_HOST
 [[ -z ${PROFILE} ]] && PROFILE=${HOST}
 [[ ${PROFILE} == "current" ]] && PROFILE=$(PROFILE=${HOST} get_current_profile)
 eval ${DOIT}