From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-505630-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id CB74F138010
	for <garchives@archives.gentoo.org>; Fri, 14 Sep 2012 02:25:24 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 7814421C028;
	Fri, 14 Sep 2012 02:24:17 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 47FD421C024
	for <gentoo-commits@lists.gentoo.org>; Fri, 14 Sep 2012 02:24:17 +0000 (UTC)
Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id ABF1B33D218
	for <gentoo-commits@lists.gentoo.org>; Fri, 14 Sep 2012 02:24:16 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id 5C84FE543C
	for <gentoo-commits@lists.gentoo.org>; Fri, 14 Sep 2012 02:24:15 +0000 (UTC)
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org>
Message-ID: <1347589444.a10fea0231db16dd8bbb5384c060844a20e9ef33.zmedico@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
X-VCS-Repository: proj/portage
X-VCS-Files: pym/portage/package/ebuild/config.py
X-VCS-Directories: pym/portage/package/ebuild/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: a10fea0231db16dd8bbb5384c060844a20e9ef33
X-VCS-Branch: master
Date: Fri, 14 Sep 2012 02:24:15 +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
X-Archives-Salt: 7051ac64-fefd-4037-a598-c97d575b4b76
X-Archives-Hash: 014417322cec52b4ebfd910d4dcab1c9

commit:     a10fea0231db16dd8bbb5384c060844a20e9ef33
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 14 02:24:04 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Sep 14 02:24:04 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a10fea02

Refactor FEATURES=test USE logic.

---
 pym/portage/package/ebuild/config.py |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index bb0a7c1..c1630cb 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1467,9 +1467,11 @@ class config(object):
 			not hasattr(self, "_ebuild_force_test_msg_shown"):
 				self._ebuild_force_test_msg_shown = True
 				writemsg(_("Forcing test.\n"), noiselevel=-1)
-		if "test" in self.features and \
-			("test" in explicit_iuse or iuse_implicit_match("test")):
-			if "test" in self.usemask and not ebuild_force_test:
+
+		if "test" in explicit_iuse or iuse_implicit_match("test"):
+			if "test" not in self.features:
+				use.discard("test")
+			elif "test" in self.usemask and not ebuild_force_test:
 				# "test" is in IUSE and USE=test is masked, so execution
 				# of src_test() probably is not reliable. Therefore,
 				# temporarily disable FEATURES=test just for this package.
@@ -1481,11 +1483,6 @@ class config(object):
 				if ebuild_force_test and "test" in self.usemask:
 					self.usemask = \
 						frozenset(x for x in self.usemask if x != "test")
-		elif "test" in explicit_iuse or iuse_implicit_match("test"):
-			if "test" in self.usemask or "test" not in self.features:
-				use.discard("test")
-			elif "test" in self.features:
-				use.add("test")
 
 		# Allow _* flags from USE_EXPAND wildcards to pass through here.
 		use.difference_update([x for x in use \