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-381681-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1R2wrQ-0006xY-VV
	for garchives@archives.gentoo.org; Mon, 12 Sep 2011 03:07:09 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 8A03E21C102;
	Mon, 12 Sep 2011 03:06:42 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 583F521C102
	for <gentoo-commits@lists.gentoo.org>; Mon, 12 Sep 2011 03:06:42 +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 D0C711B400A
	for <gentoo-commits@lists.gentoo.org>; Mon, 12 Sep 2011 03:06:41 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id DCC0C8003C
	for <gentoo-commits@lists.gentoo.org>; Mon, 12 Sep 2011 03:06:40 +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: <9fd712873f8f974089bbd4ab43f3ff4bd3308aa9.zmedico@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: bin/
X-VCS-Repository: proj/portage
X-VCS-Files: bin/save-ebuild-env.sh
X-VCS-Directories: bin/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: 9fd712873f8f974089bbd4ab43f3ff4bd3308aa9
Date: Mon, 12 Sep 2011 03:06:40 +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: 6601494e3009af70ba3569a51ed5c940

commit:     9fd712873f8f974089bbd4ab43f3ff4bd3308aa9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 12 03:06:27 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 03:06:27 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a=
=3Dcommit;h=3D9fd71287

save-ebuild-env.sh: tweak PYTHONPATH cleansing

---
 bin/save-ebuild-env.sh |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index 3bb8255..a84a125 100644
--- a/bin/save-ebuild-env.sh
+++ b/bin/save-ebuild-env.sh
@@ -14,9 +14,13 @@ save_ebuild_env() {
 	(
 	if has --exclude-init-phases $* ; then
 		unset S _E_DOCDESTTREE_ _E_EXEDESTTREE_
-		if [[ -n $PYTHONPATH ]] ; then
-			export PYTHONPATH=3D${PYTHONPATH/${PORTAGE_PYM_PATH}:}
-			[[ -z $PYTHONPATH ]] && unset PYTHONPATH
+		if [[ -n $PYTHONPATH &&
+			${PYTHONPATH%%:*} -ef $PORTAGE_PYM_PATH ]] ; then
+			if [[ $PYTHONPATH =3D=3D *:* ]] ; then
+				export PYTHONPATH=3D${PYTHONPATH#*:}
+			else
+				unset PYTHONPATH
+			fi
 		fi
 	fi
=20