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 1RYlK9-0006st-BM for garchives@archives.gentoo.org; Thu, 08 Dec 2011 21:16:13 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 73CB221C1DB; Thu, 8 Dec 2011 21:16:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4807621C1DB for ; Thu, 8 Dec 2011 21:16:06 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C17CD1B4024 for ; Thu, 8 Dec 2011 21:16:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id EEC5E80042 for ; Thu, 8 Dec 2011 21:16:04 +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: <9fd2fbb571fccae2e1f58daeeef348a91023cde5.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/const.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 9fd2fbb571fccae2e1f58daeeef348a91023cde5 Date: Thu, 8 Dec 2011 21:16:04 +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: 1f373d3e-ad37-4689-8f8b-92899d7d73f0 X-Archives-Hash: 9443f48c759b45381098b7a919a9c5b8 commit: 9fd2fbb571fccae2e1f58daeeef348a91023cde5 Author: Zac Medico gentoo org> AuthorDate: Thu Dec 8 21:15:55 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Dec 8 21:15:55 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D9fd2fbb5 Add portage.const.EPREFIX, for prefix installs. The EPREFIX for the current install is hardcoded here, but access to this constant should be minimal, in favor of access via the EPREFIX setting of a config instance (since it's possible to contruct a config instance with a different EPREFIX). --- pym/portage/const.py | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/pym/portage/const.py b/pym/portage/const.py index 3dad36a..5eeebe1 100644 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@ -140,6 +140,24 @@ MANIFEST2_HASH_DEFAULTS =3D frozenset(["SHA1", "SHA2= 56", "RMD160"]) MANIFEST2_REQUIRED_HASH =3D "SHA256" =20 MANIFEST2_IDENTIFIERS =3D ("AUX", "MISC", "DIST", "EBUILD") + +# The EPREFIX for the current install is hardcoded here, but access to t= his +# constant should be minimal, in favor of access via the EPREFIX setting= of +# a config instance (since it's possible to contruct a config instance w= ith +# a different EPREFIX). Therefore, the EPREFIX constant should *NOT* be = used +# in the definition of any other contstants within this file. +EPREFIX=3D"" + +# pick up EPREFIX from the environment if set +if "__PORTAGE_TEST_EPREFIX" in os.environ: + EPREFIX =3D os.environ["__PORTAGE_TEST_EPREFIX"] + if EPREFIX: + EPREFIX =3D os.path.normpath(EPREFIX) + +elif EPREFIX: + # Propagate the constant to other portage code which uses this variable= . + os.environ["__PORTAGE_TEST_EPREFIX"] =3D EPREFIX + # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D # END OF CONSTANTS -- END OF CONSTANTS -- END OF CONSTANTS -- END OF CON= STANT # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D