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-376997-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Qy77E-0000TH-RS
	for garchives@archives.gentoo.org; Mon, 29 Aug 2011 19:03:25 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 3B3D321C077;
	Mon, 29 Aug 2011 19:03:15 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id E332621C049
	for <gentoo-commits@lists.gentoo.org>; Mon, 29 Aug 2011 19:03:14 +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 349411B411A
	for <gentoo-commits@lists.gentoo.org>; Mon, 29 Aug 2011 19:03:14 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 803B780040
	for <gentoo-commits@lists.gentoo.org>; Mon, 29 Aug 2011 19:03:13 +0000 (UTC)
From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" <grobian@gentoo.org>
Message-ID: <5b6156b085ab5ae518fa6c4ed9b2e2c5b75fd184.grobian@gentoo>
Subject: [gentoo-commits] proj/portage:prefix commit in: /
X-VCS-Repository: proj/portage
X-VCS-Committer: grobian
X-VCS-Committer-Name: Fabian Groffen
X-VCS-Revision: 5b6156b085ab5ae518fa6c4ed9b2e2c5b75fd184
Date: Mon, 29 Aug 2011 19:03:13 +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: 65fbb7b2edc0e38dd3a97d030f1ea345

commit:     5b6156b085ab5ae518fa6c4ed9b2e2c5b75fd184
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 29 18:56:30 2011 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Aug 29 18:56:30 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a=
=3Dcommit;h=3D5b6156b0

Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix

Conflicts:
	bin/dispatch-conf
	bin/repoman
	pym/portage/__init__.py
	pym/portage/tests/runTests
	pym/portage/util/env_update.py
	runtests.sh


 bin/dispatch-conf                                  |    6 +-
 bin/ebuild.sh                                      |   37 +----
 bin/egencache                                      |   12 ++-
 bin/repoman                                        |   23 ++-
 cnf/metadata.dtd                                   |   99 +++++++++++
 man/emerge.1                                       |   14 +-
 pym/_emerge/AsynchronousLock.py                    |   13 ++
 pym/_emerge/BinpkgEnvExtractor.py                  |    2 +-
 pym/_emerge/EbuildPhase.py                         |    7 +-
 pym/_emerge/PipeReader.py                          |    1 +
 pym/_emerge/PollScheduler.py                       |    3 +
 pym/_emerge/Scheduler.py                           |    2 +-
 pym/_emerge/SpawnProcess.py                        |   10 +-
 pym/_emerge/actions.py                             |    3 +-
 pym/_emerge/depgraph.py                            |  153 +++++++-------=
---
 pym/_emerge/help.py                                |   18 +-
 pym/portage/__init__.py                            |   10 +-
 pym/portage/data.py                                |    3 +
 pym/portage/dbapi/vartree.py                       |   21 ++-
 pym/portage/elog/messages.py                       |    6 +-
 pym/portage/package/ebuild/doebuild.py             |   90 ++++++++++-
 pym/portage/package/ebuild/prepare_build_dirs.py   |    4 +
 pym/portage/tests/__init__.py                      |   34 +++-
 .../tests/ebuild/test_array_fromfile_eof.py        |    1 +
 pym/portage/tests/{dbapi =3D> emerge}/__init__.py    |    0
 pym/portage/tests/{bin =3D> emerge}/__test__         |    0
 pym/portage/tests/emerge/test_simple.py            |  143 ++++++++++++++=
++
 .../test_lazy_import_portage_baseline.py           |    2 +-
 pym/portage/tests/process/test_poll.py             |   10 +-
 pym/portage/tests/{dbapi =3D> repoman}/__init__.py   |    0
 pym/portage/tests/{bin =3D> repoman}/__test__        |    0
 pym/portage/tests/repoman/test_simple.py           |  174 ++++++++++++++=
++++++
 pym/portage/tests/resolver/ResolverPlayground.py   |   25 +++-
 pym/portage/tests/resolver/test_rebuild.py         |   65 ++++----
 pym/portage/update.py                              |    9 +-
 pym/portage/util/ExtractKernelVersion.py           |    2 +
 pym/portage/util/_dyn_libs/LinkageMapELF.py        |    1 +
 pym/portage/util/_pty.py                           |    1 +
 pym/portage/util/env_update.py                     |   59 +++----
 pym/portage/xml/metadata.py                        |    2 +
 pym/portage/xpak.py                                |    4 +-
 runtests.sh                                        |    2 +-
 42 files changed, 817 insertions(+), 254 deletions(-)

diff --cc bin/dispatch-conf
index 6ce255e,497927d..fe85c54
--- a/bin/dispatch-conf
+++ b/bin/dispatch-conf
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python -O
 +#!@PREFIX_PORTAGE_PYTHON@ -O
- # Copyright 1999-2006 Gentoo Foundation
+ # Copyright 1999-2011 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
 =20
  #
diff --cc bin/repoman
index d58c52f,d9ecfc4..ed62fa1
--- a/bin/repoman
+++ b/bin/repoman
@@@ -99,7 -96,8 +99,10 @@@ os.umask(0o22
  # behave incrementally.
  repoman_incrementals =3D tuple(x for x in \
  	portage.const.INCREMENTALS if x !=3D 'ACCEPT_KEYWORDS')
- repoman_settings =3D portage.config(local_config=3DFalse, _eprefix=3DEP=
REFIX)
+ eprefix =3D os.environ.get("__REPOMAN_TEST_EPREFIX")
++if not eprefix:
++	eprefix =3D EPREFIX
+ repoman_settings =3D portage.config(local_config=3DFalse, _eprefix=3Dep=
refix)
  repoman_settings.lock()
 =20
  if repoman_settings.get("NOCOLOR", "").lower() in ("yes", "true") or \
diff --cc pym/portage/__init__.py
index 4ce9efe,72cdf2d..8b5426b
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@@ -473,8 -472,9 +473,11 @@@ def create_trees(config_root=3DNone, targ
  			portdbapi.portdbapi_instances.remove(portdb)
  			del trees[myroot]["porttree"], myroot, portdb
 =20
+ 	eprefix =3D os.environ.get("__PORTAGE_TEST_EPREFIX")
++	if not eprefix:
++		eprefix =3D EPREFIX
  	settings =3D config(config_root=3Dconfig_root, target_root=3Dtarget_ro=
ot,
- 		config_incrementals=3Dportage.const.INCREMENTALS, _eprefix=3DEPREFIX)
+ 		config_incrementals=3Dportage.const.INCREMENTALS, _eprefix=3Deprefix)
  	settings.lock()
 =20
  	myroots =3D [(settings["ROOT"], settings)]
diff --cc pym/portage/data.py
index 0c0e320,c496c0b..354fc9c
--- a/pym/portage/data.py
+++ b/pym/portage/data.py
@@@ -67,8 -63,11 +67,11 @@@ secpass=3D
  uid=3Dos.getuid()
  wheelgid=3D0
 =20
 -if uid=3D=3D0:
 +if uid=3D=3Drootuid:
  	secpass=3D2
+ elif "__PORTAGE_TEST_EPREFIX" in os.environ:
+ 	secpass =3D 2
+=20
  try:
  	wheelgid=3Dgrp.getgrnam("wheel")[2]
  except KeyError:
diff --cc pym/portage/util/env_update.py
index 2650f15,1731663..d4f3787
--- a/pym/portage/util/env_update.py
+++ b/pym/portage/util/env_update.py
@@@ -47,8 -46,13 +46,15 @@@ def env_update(makelinks=3D1, target_root
  	if prev_mtimes is None:
  		prev_mtimes =3D portage.mtimedb["ldpath"]
  	if env is None:
- 		env =3D os.environ
- 	envd_dir =3D os.path.join(target_root, EPREFIX_LSTRIP, "etc", "env.d")
+ 		settings =3D os.environ
++		if 'EPREFIX' not in settings:
++			settings['EPREFIX'] =3D portage.const.EPREFIX
+ 	else:
+ 		settings =3D env
+=20
+ 	eprefix =3D settings.get("EPREFIX", "")
+ 	eprefix_lstrip =3D eprefix.lstrip(os.sep)
+ 	envd_dir =3D os.path.join(target_root, eprefix_lstrip, "etc", "env.d")
  	ensure_dirs(envd_dir, mode=3D0o755)
  	fns =3D listdir(envd_dir, EmptyOnError=3D1)
  	fns.sort()
@@@ -279,12 -271,12 +273,12 @@@
  	penvnotice  =3D "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.=
\n"
  	penvnotice +=3D "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\=
n"
  	cenvnotice  =3D penvnotice[:]
- 	penvnotice +=3D "# GO INTO " + EPREFIX + "/etc/profile NOT /etc/profil=
e.env\n\n"
- 	cenvnotice +=3D "# GO INTO " + EPREFIX + "/etc/csh.cshrc NOT /etc/csh.=
env\n\n"
 -	penvnotice +=3D "# GO INTO /etc/profile NOT /etc/profile.env\n\n"
 -	cenvnotice +=3D "# GO INTO /etc/csh.cshrc NOT /etc/csh.env\n\n"
++	penvnotice +=3D "# GO INTO " + eprefix + "/etc/profile NOT /etc/profil=
e.env\n\n"
++	cenvnotice +=3D "# GO INTO " + eprefix + "/etc/csh.cshrc NOT /etc/csh.=
env\n\n"
 =20
  	#create /etc/profile.env for bash support
- 	outfile =3D atomic_ofstream(os.path.join(target_root, EPREFIX_LSTRIP, =
"etc", "profile.env"))
+ 	outfile =3D atomic_ofstream(os.path.join(
+ 		target_root, eprefix_lstrip, "etc", "profile.env"))
  	outfile.write(penvnotice)
 =20
  	env_keys =3D [ x for x in env if x !=3D "LDPATH" ]
diff --cc runtests.sh
index dadd32d,981fa1e..52f7bb0
--- a/runtests.sh
+++ b/runtests.sh
@@@ -26,9 -26,9 +26,9 @@@ trap interrupted SIGIN
 =20
  exit_status=3D"0"
  for version in ${PYTHON_VERSIONS}; do
 -	if [[ -x /usr/bin/python${version} ]]; then
 +	if [[ -x @PREFIX_PORTAGE_PYTHON@${version} ]]; then
  		echo -e "${GOOD}Testing with Python ${version}...${NORMAL}"
- 		if ! @PREFIX_PORTAGE_PYTHON@${version} pym/portage/tests/runTests "$@=
" ; then
 -		if ! /usr/bin/python${version} -Wd pym/portage/tests/runTests "$@" ; =
then
++		if ! @PREFIX_PORTAGE_PYTHON@${version} -Wd pym/portage/tests/runTests=
 "$@" ; then
  			echo -e "${BAD}Testing with Python ${version} failed${NORMAL}"
  			exit_status=3D"1"
  		fi