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 ) id 1Qc8dV-0000Ev-UJ for garchives@archives.gentoo.org; Thu, 30 Jun 2011 04:13:54 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B90D71C007; Thu, 30 Jun 2011 04:13:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8A80A1C007 for ; Thu, 30 Jun 2011 04:13:46 +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 109F52AC00B for ; Thu, 30 Jun 2011 04:13:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 13AE68003C for ; Thu, 30 Jun 2011 04:13:45 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: 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: fa9e85bbe7c513193756a2d13ce63a609138753d Date: Thu, 30 Jun 2011 04:13:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 6aa4e0584ada9dd7bf123a864384f745 commit: fa9e85bbe7c513193756a2d13ce63a609138753d Author: Zac Medico gentoo org> AuthorDate: Thu Jun 30 04:13:20 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Jun 30 04:13:20 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dfa9e85bb ebuild(1): pass Package instance to setcpv This should improve repo-level support, for bug #370693. --- bin/ebuild | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/bin/ebuild b/bin/ebuild index 9ad17e8..68e52e3 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -76,6 +76,8 @@ from portage import _shell_quote from portage import _unicode_decode from portage import _unicode_encode from portage.const import VDB_PATH +from _emerge.Package import Package +from _emerge.RootConfig import RootConfig =20 if not opts.ignore_default_opts: default_opts =3D portage.settings.get("EBUILD_DEFAULT_OPTS", "").split(= ) @@ -171,6 +173,7 @@ if not portage.catpkgsplit(cpv): =20 if ebuild.startswith(vdb_path): mytree =3D "vartree" + pkg_type =3D "installed" =20 portage_ebuild =3D portage.db[portage.root][mytree].dbapi.findname(cpv,= myrepo=3Dmyrepo) =20 @@ -180,6 +183,7 @@ if ebuild.startswith(vdb_path): =20 else: mytree =3D "porttree" + pkg_type =3D "ebuild" =20 portage_ebuild =3D portage.portdb.findname(cpv, myrepo=3Dmyrepo) =20 @@ -253,14 +257,26 @@ if "test" in pargs: =20 tmpsettings.features.discard("fail-clean") =20 -# 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) + metadata =3D dict(zip(Package.metadata_keys, + portage.db[portage.settings["ROOT"]][mytree].dbapi.aux_get( + cpv, Package.metadata_keys))) except KeyError: # aux_get failure, message should have been shown on stderr. sys.exit(1) =20 +root_config =3D RootConfig(portage.settings, + portage.db[portage.settings["ROOT"]], None) + +pkg =3D Package(built=3D(pkg_type !=3D "ebuild"), cpv=3Dcpv, + metadata=3Dmetadata, root_config=3Droot_config, + type_name=3Dpkg_type) + +# Apply package.env and repo-level settings. This allows per-package +# FEATURES and other variables (possibly PORTAGE_TMPDIR) to be +# available as soon as possible. +tmpsettings.setcpv(pkg) + def stale_env_warning(): if "clean" not in pargs and \ "noauto" not in tmpsettings.features and \