From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-commits+bounces-381675-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1R2v2t-0004MB-9F
	for garchives@archives.gentoo.org; Mon, 12 Sep 2011 01:10:47 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id C4D4721C1B4;
	Mon, 12 Sep 2011 01:10:34 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 7CEBC21C1B4
	for <gentoo-commits@lists.gentoo.org>; Mon, 12 Sep 2011 01:10:34 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id E6E651B4008
	for <gentoo-commits@lists.gentoo.org>; Mon, 12 Sep 2011 01:10:33 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id E72C680042
	for <gentoo-commits@lists.gentoo.org>; Mon, 12 Sep 2011 01:10:32 +0000 (UTC)
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org>
Message-ID: <4463e4a87ec2835e1454bbe4f99e5b054aa12855.zmedico@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: bin/
X-VCS-Repository: proj/portage
X-VCS-Files: bin/bashrc-functions.sh bin/ebuild.sh bin/isolated-functions.sh
X-VCS-Directories: bin/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: 4463e4a87ec2835e1454bbe4f99e5b054aa12855
Date: Mon, 12 Sep 2011 01:10:32 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: 4f5e87ed48f8d250edc72cc558eec139

commit:     4463e4a87ec2835e1454bbe4f99e5b054aa12855
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 12 01:09:44 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 01:09:44 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a=
=3Dcommit;h=3D4463e4a8

Move KV funcs to bashrc-functions.sh.

---
 bin/bashrc-functions.sh   |   51 +++++++++++++++++++++++++++++++++++++++=
++++++
 bin/ebuild.sh             |    5 ++-
 bin/isolated-functions.sh |   51 ---------------------------------------=
------
 3 files changed, 54 insertions(+), 53 deletions(-)

diff --git a/bin/bashrc-functions.sh b/bin/bashrc-functions.sh
index 91ff6d7..4da5585 100644
--- a/bin/bashrc-functions.sh
+++ b/bin/bashrc-functions.sh
@@ -87,3 +87,54 @@ unset_unless_changed() {
 		fi
 	done
 }
+
+KV_major() {
+	[[ -z $1 ]] && return 1
+
+	local KV=3D$@
+	echo "${KV%%.*}"
+}
+
+KV_minor() {
+	[[ -z $1 ]] && return 1
+
+	local KV=3D$@
+	KV=3D${KV#*.}
+	echo "${KV%%.*}"
+}
+
+KV_micro() {
+	[[ -z $1 ]] && return 1
+
+	local KV=3D$@
+	KV=3D${KV#*.*.}
+	echo "${KV%%[^[:digit:]]*}"
+}
+
+KV_to_int() {
+	[[ -z $1 ]] && return 1
+
+	local KV_MAJOR=3D$(KV_major "$1")
+	local KV_MINOR=3D$(KV_minor "$1")
+	local KV_MICRO=3D$(KV_micro "$1")
+	local KV_int=3D$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
+
+	# We make version 2.2.0 the minimum version we will handle as
+	# a sanity check ... if its less, we fail ...
+	if [[ ${KV_int} -ge 131584 ]] ; then
+		echo "${KV_int}"
+		return 0
+	fi
+
+	return 1
+}
+
+_RC_GET_KV_CACHE=3D""
+get_KV() {
+	[[ -z ${_RC_GET_KV_CACHE} ]] \
+		&& _RC_GET_KV_CACHE=3D$(uname -r)
+
+	echo $(KV_to_int "${_RC_GET_KV_CACHE}")
+
+	return $?
+}

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 1d01416..641d827 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -27,8 +27,9 @@ else
 	# These dummy functions are for things that are likely to be called
 	# in global scope, even though they are completely useless during
 	# the "depend" phase.
-	for x in diropts docompress exeopts insopts \
-		keepdir libopts register_die_hook register_success_hook \
+	for x in diropts docompress exeopts get_KV insopts \
+		keepdir KV_major KV_micro KV_minor KV_to_int \
+		libopts register_die_hook register_success_hook \
 		remove_path_entry set_unless_changed strip_duplicate_slashes \
 		unset_unless_changed use useq usev use_with use_enable ; do
 		eval "${x}() { : ; }"

diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 5247e7e..dbd653c 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -397,57 +397,6 @@ eend() {
 	return ${retval}
 }
=20
-KV_major() {
-	[[ -z $1 ]] && return 1
-
-	local KV=3D$@
-	echo "${KV%%.*}"
-}
-
-KV_minor() {
-	[[ -z $1 ]] && return 1
-
-	local KV=3D$@
-	KV=3D${KV#*.}
-	echo "${KV%%.*}"
-}
-
-KV_micro() {
-	[[ -z $1 ]] && return 1
-
-	local KV=3D$@
-	KV=3D${KV#*.*.}
-	echo "${KV%%[^[:digit:]]*}"
-}
-
-KV_to_int() {
-	[[ -z $1 ]] && return 1
-
-	local KV_MAJOR=3D$(KV_major "$1")
-	local KV_MINOR=3D$(KV_minor "$1")
-	local KV_MICRO=3D$(KV_micro "$1")
-	local KV_int=3D$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
-
-	# We make version 2.2.0 the minimum version we will handle as
-	# a sanity check ... if its less, we fail ...
-	if [[ ${KV_int} -ge 131584 ]] ; then
-		echo "${KV_int}"
-		return 0
-	fi
-
-	return 1
-}
-
-_RC_GET_KV_CACHE=3D""
-get_KV() {
-	[[ -z ${_RC_GET_KV_CACHE} ]] \
-		&& _RC_GET_KV_CACHE=3D$(uname -r)
-
-	echo $(KV_to_int "${_RC_GET_KV_CACHE}")
-
-	return $?
-}
-
 unset_colors() {
 	COLS=3D80
 	ENDCOL=3D