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-321083-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Pu8J3-0000FS-DY
	for garchives@archives.gentoo.org; Mon, 28 Feb 2011 18:58:53 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A98761C025;
	Mon, 28 Feb 2011 18:58:46 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 7C01E1C025
	for <gentoo-commits@lists.gentoo.org>; Mon, 28 Feb 2011 18:58:46 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 095701B4090
	for <gentoo-commits@lists.gentoo.org>; Mon, 28 Feb 2011 18:58:46 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 733768006A
	for <gentoo-commits@lists.gentoo.org>; Mon, 28 Feb 2011 18:58:45 +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: <0b39d24bb8270e5c89eaddfd1f5a4181cf9e31d3.zmedico@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: bin/
X-VCS-Repository: proj/portage
X-VCS-Files: bin/ebuild
X-VCS-Directories: bin/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: 0b39d24bb8270e5c89eaddfd1f5a4181cf9e31d3
Date: Mon, 28 Feb 2011 18:58:45 +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: f2bcdc624ebdca1cd7d0f3f3dc73a882

commit:     0b39d24bb8270e5c89eaddfd1f5a4181cf9e31d3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 28 18:57:53 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 28 18:57:53 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a=
=3Dcommit;h=3D0b39d24b

ebuild(1): apply package.env earlier

This makes it possible to override PORTAGE_TMPDIR.

---
 bin/ebuild |   28 ++++++++++++++++++++++------
 1 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/bin/ebuild b/bin/ebuild
index 2c04200..a8296e8 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -220,20 +220,36 @@ portage.settings.validate() # generate warning mess=
ages if necessary
 tmpsettings =3D portage.config(clone=3Dportage.settings)
 tmpsettings["PORTAGE_VERBOSE"] =3D "1"
 tmpsettings.backup_changes("PORTAGE_VERBOSE")
+
+if opts.skip_manifest:
+	tmpsettings["EBUILD_SKIP_MANIFEST"] =3D "1"
+	tmpsettings.backup_changes("EBUILD_SKIP_MANIFEST")
+
+if opts.skip_manifest or \
+	"digest" in tmpsettings.features or \
+	"digest" in pargs or \
+	"manifest" in pargs:
+	portage._doebuild_manifest_exempt_depend +=3D 1
+
 if "test" in pargs:
 	# This variable is a signal to config.regenerate() to
 	# indicate that the test phase should be enabled regardless
 	# of problems such as masked "test" USE flag.
 	tmpsettings["EBUILD_FORCE_TEST"] =3D "1"
 	tmpsettings.backup_changes("EBUILD_FORCE_TEST")
-	tmpsettings.features.add("test")
+	tmpsettings["FEATURES"] =3D tmpsettings.get("FEATURES", "") + " " + "te=
st"
+	tmpsettings.backup_changes("FEATURES")
=20
-tmpsettings.features.discard('fail-clean')
+tmpsettings["FEATURES"] =3D tmpsettings.get("FEATURES", "") + " " + "-fa=
il-clean"
+tmpsettings.backup_changes("FEATURES")
=20
-if opts.skip_manifest:
-	tmpsettings["EBUILD_SKIP_MANIFEST"] =3D "1"
-	tmpsettings.backup_changes("EBUILD_SKIP_MANIFEST")
-	portage._doebuild_manifest_exempt_depend +=3D 1
+# Apply package.env settings. This allows per-package FEATURES and other
+# variables (possibly PORTAGE_TMPDIR) to be available as soon as possibl=
e.
+try:
+	tmpsettings.setcpv(cpv, mydb=3Dportage.db[portage.root][mytree].dbapi)
+except KeyError:
+	# aux_get failure, message should have been shown on stderr.
+	sys.exit(1)
=20
 build_dir_phases =3D set(["setup", "unpack", "prepare", "configure", "co=
mpile",
 	"test", "install", "package", "rpm", "merge", "qmerge"])