Merge remote branch 'overlays-gentoo-org/master' into prefix
authorFabian Groffen <grobian@gentoo.org>
Sun, 15 Aug 2010 09:43:15 +0000 (11:43 +0200)
committerFabian Groffen <grobian@gentoo.org>
Sun, 15 Aug 2010 09:43:15 +0000 (11:43 +0200)
Conflicts:
bin/ebuild-helpers/die
bin/ebuild-helpers/dobin
bin/ebuild-helpers/dodir
bin/ebuild-helpers/dodoc
bin/ebuild-helpers/dohtml
bin/ebuild-helpers/doinfo
bin/ebuild-helpers/dosbin
bin/ebuild-helpers/dosym
bin/ebuild-helpers/ecompressdir
bin/ebuild-helpers/emake
bin/ebuild-helpers/fowners
bin/ebuild-helpers/fperms
bin/ebuild-helpers/portageq
bin/ebuild.sh
bin/misc-functions.sh
bin/repoman
pym/_emerge/Package.py
pym/_emerge/depgraph.py
pym/portage/_deprecated.py
pym/portage/dbapi/bintree.py
pym/portage/package/ebuild/config.py

56 files changed:
1  2 
bin/binhost-snapshot
bin/ebuild
bin/ebuild-helpers/4/dodoc
bin/ebuild-helpers/die
bin/ebuild-helpers/dobin
bin/ebuild-helpers/doconfd
bin/ebuild-helpers/dodir
bin/ebuild-helpers/dodoc
bin/ebuild-helpers/doenvd
bin/ebuild-helpers/doexe
bin/ebuild-helpers/dohtml
bin/ebuild-helpers/doinfo
bin/ebuild-helpers/doinitd
bin/ebuild-helpers/doins
bin/ebuild-helpers/dolib
bin/ebuild-helpers/doman
bin/ebuild-helpers/domo
bin/ebuild-helpers/dosbin
bin/ebuild-helpers/dosym
bin/ebuild-helpers/ecompress
bin/ebuild-helpers/ecompressdir
bin/ebuild-helpers/emake
bin/ebuild-helpers/fowners
bin/ebuild-helpers/fperms
bin/ebuild-helpers/newbin
bin/ebuild-helpers/newconfd
bin/ebuild-helpers/newdoc
bin/ebuild-helpers/newenvd
bin/ebuild-helpers/newexe
bin/ebuild-helpers/newinitd
bin/ebuild-helpers/newins
bin/ebuild-helpers/newlib.a
bin/ebuild-helpers/newlib.so
bin/ebuild-helpers/newman
bin/ebuild-helpers/newsbin
bin/ebuild-helpers/portageq
bin/ebuild-ipc
bin/ebuild-ipc.py
bin/ebuild.sh
bin/emerge-webrsync
bin/isolated-functions.sh
bin/misc-functions.sh
bin/portageq
bin/quickpkg
bin/repoman
pym/_emerge/Package.py
pym/_emerge/actions.py
pym/_emerge/depgraph.py
pym/_emerge/main.py
pym/portage/__init__.py
pym/portage/dbapi/bintree.py
pym/portage/dbapi/vartree.py
pym/portage/package/ebuild/config.py
pym/portage/package/ebuild/doebuild.py
pym/portage/tests/runTests
runtests.sh

index 825a1167221f5b7326db9ee0c600487715700359,825a1167221f5b7326db9ee0c600487715700359..64e33a14e40073ab4903b500a43dcf1c695e0601
@@@ -1,4 -1,4 +1,4 @@@
--#!/usr/bin/python
++#!@PORTAGE_PYTHON@
  # Copyright 2010 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
diff --cc bin/ebuild
Simple merge
index 0639b3989c424d6151e9e317480b28e401ed04ef,c9068a8b5d07b1cdf5ed7d1eb913f5a8abb69eb5..48dc4d6e07bc071988186bfb538e02eb50855e79
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2009 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
  
  if [ $# -lt 1 ] ; then
-       vecho "${0##*/}: at least one argument needed" 1>&2
+       die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
index da703a066bf85c590d4ddef44896712acaef281a,9869141ddaaad337eb853f3ce88d709617585040..a27ebd4f83248b4eb194053c96ba9a2efcf34110
@@@ -1,11 -1,7 +1,7 @@@
 -#!/bin/bash
 +#!@PORTAGE_BASH@
- # Copyright 2009 Gentoo Foundation
+ # Copyright 2010 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
- # TODO: Eliminate race condition in signal delivery by using pipe or socket
- # IPC to guarantee that the ebuild process and all of its children (including
- # this helper) are killed immediately, ensuring that "false success" is
- # impossible.
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
  die "$@"
  exit 1
index 1bae1b5cb9b9cfbdf126bd42d6d44afa8fe5e9b1,fc0b0359f1998c803527292d4f3557ae9c06405e..0b25b25a31fe907c3c644a5195b4699177add10b
@@@ -2,15 -2,15 +2,15 @@@
  # Copyright 1999-2006 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
  
  if [[ $# -lt 1 ]] ; then
-       vecho "$0: at least one argument needed" 1>&2
+       helpers_die "$0: at least one argument needed"
        exit 1
  fi
  
 -if [[ ! -d ${D}${DESTTREE}/bin ]] ; then
 -      install -d "${D}${DESTTREE}/bin" || { helpers_die "$0: failed to install ${D}${DESTTREE}/bin"; exit 2; }
 +if [[ ! -d ${ED}${DESTTREE}/bin ]] ; then
-       install -d "${ED}${DESTTREE}/bin" || exit 2
++      install -d "${ED}${DESTTREE}/bin" || { helpers_die "$0: failed to install ${ED}${DESTTREE}/bin"; exit 2; }
  fi
  
  ret=0
Simple merge
index d2747be526b0be6e8b24f43595b59b0d53a963be,58303b2fcc30bf3083dd45a17322055d3d243108..0327813b9f24cfb2dccde3b846ab2360f4975017
@@@ -2,4 -2,9 +2,9 @@@
  # Copyright 1999-2006 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
- exec install -d ${DIROPTIONS} "${@/#/${ED}/}"
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
++source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
+ 
 -install -d ${DIROPTIONS} "${@/#/${D}/}"
++install -d ${DIROPTIONS} "${@/#/${ED}/}"
+ ret=$?
+ [[ $ret -ne 0 ]] && helpers_die "$0 failed"
+ exit $ret
index 6536fd405552709d063e19b5f17f21d616862dc2,6d750c9392d808b1c51fe516ca8f93bd251c1b55..f67d283c1fb99a7df74aa5afeef12c1b735b04fe
@@@ -2,9 -2,10 +2,10 @@@
  # Copyright 1999-2007 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
++source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
+ 
  if [ $# -lt 1 ] ; then
-       source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
-       vecho "${0##*/}: at least one argument needed" 1>&2
+       helpers_die "${0##*/}: at least one argument needed"
        exit 1  
  fi
  
Simple merge
index 8917fc4a33a48a81c37aacbf105628a56d6392d4,191e7f91898c8decbf44c741665f40cc289bc68e..c293784ef0625cd048f6203fad749d9351b56a55
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2007 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
  
  if [[ $# -lt 1 ]] ; then
-       echo "$0: at least one argument needed" 1>&2
+       helpers_die "$0: at least one argument needed"
        exit 1
  fi
  
index 21535cefb9865fe46510efab7aff01944d61670b,cb29dc3f3e13de2a1835198cdef0e6402f617706..743ce6f0a5b424bbde6786e3021c543280fa6d18
@@@ -1,10 -1,14 +1,14 @@@
 -#!/bin/bash
 +#!@PORTAGE_BASH@
- # Copyright 2009 Gentoo Foundation
+ # Copyright 2009-2010 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
++source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
+ 
 -PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}
 -PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
 +PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}
 +PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym}
- # Set EPYTHON variable as empty so that dohtml doesn't try
- # to use potentially unsupported version of Python.
- EPYTHON= PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
-       exec "$PORTAGE_BIN_PATH/dohtml.py" "$@"
+ PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
 -      "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
++      "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
+ 
+ ret=$?
+ [[ $ret -ne 0 ]] && helpers_die "$0 failed"
+ exit $ret
index 51f8a1d1d64e116bac057e81e7ed3e113c117acf,2c3d1e0718aaecf2e645ca69239cde0a9fd38968..1cf738d884225952f73a2556cf60367919ac3564
@@@ -9,11 -9,11 +9,11 @@@ if [[ -z $1 ]] ; the
        exit 1  
  fi
  
 -if [[ ! -d ${D}usr/share/info ]] ; then
 -      install -d "${D}usr/share/info" || { helpers_die "$0: failed to install ${D}usr/share/info"; exit 1; }
 +if [[ ! -d ${ED}usr/share/info ]] ; then
-       install -d "${ED}usr/share/info" || exit 1
++      install -d "${ED}usr/share/info" || { helpers_die "$0: failed to install ${ED}usr/share/info"; exit 1; }
  fi
  
 -install -m0644 "$@" "${D}usr/share/info"
 +install -m0644 "$@" "${ED}usr/share/info"
  rval=$?
  if [ $rval -ne 0 ] ; then
        for x in "$@" ; do
Simple merge
index 6030eb4c988361be88dfb759d1077b93c2f2abff,c59b9bcfdff83e9daa11b8230d369ea136c51ef4..f18e7ebf289f6985b6053b7e086a1d1954a922b1
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2009 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
  
  if [ $# -lt 1 ] ; then
-       echo "${0##*/}: at least one argument needed" 1>&2
+       helpers_die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
@@@ -18,9 -18,10 +18,10 @@@ f
  
  if [[ ${INSDESTTREE#${D}} != "${INSDESTTREE}" ]]; then
        vecho "-------------------------------------------------------" 1>&2
 -      vecho "You should not use \${D} with helpers." 1>&2
 +      vecho "You should not use \${D} or \${ED} with helpers." 1>&2
        vecho "  --> ${INSDESTTREE}" 1>&2
        vecho "-------------------------------------------------------" 1>&2
+       helpers_die "$0 used with \${D}"
        exit 1
  fi
  
Simple merge
index 42d0abc81b76a3c660678cb4a3f0f24f08321b55,0d95c18baeb964a063516d4bfbc594f7c0e06175..90fce11efbc6b25aca11643dbb4a891544be2d58
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2006 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
  
  if [[ $# -lt 1 ]] ; then
-       echo "$0: at least one argument needed" 1>&2
+       helpers_die "$0: at least one argument needed"
        exit 1
  fi
  
index 37cf1401bf44cfb96c970c5b08d992122e05f049,43f78d010bafee8fade038d7ba690eb9a6358f4c..a88b8d79d993ce6d0f910c96f6b8bfefd96a5c65
@@@ -2,13 -2,15 +2,15 @@@
  # Copyright 1999-2006 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
+ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+ 
  mynum=${#}
  if [ ${mynum} -lt 1 ] ; then
-       echo "${0}: at least one argument needed"
+       helpers_die "${0}: at least one argument needed"
        exit 1
  fi
 -if [ ! -d "${D}${DESTTREE}/share/locale" ] ; then
 -      install -d "${D}${DESTTREE}/share/locale/"
 +if [ ! -d "${ED}${DESTTREE}/share/locale" ] ; then
 +      install -d "${ED}${DESTTREE}/share/locale/"
  fi
  
  ret=0
index 6f40fa406b827b66d5db2318ef1247802480b49b,a16015ed6e871e0651ab507e44b2420cbc8c768d..a9a0401fd3bb2a7f3dd2eb1402448641134531a1
@@@ -2,13 -2,15 +2,15 @@@
  # Copyright 1999-2006 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
++source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
+ 
  if [[ $# -lt 1 ]] ; then
-       echo "$0: at least one argument needed" 1>&2
+       helpers_die "$0: at least one argument needed"
        exit 1
  fi
  
 -if [[ ! -d ${D}${DESTTREE}/sbin ]] ; then
 -      install -d "${D}${DESTTREE}/sbin" || { helpers_die "$0: failed to install ${D}${DESTTREE}/sbin"; exit 2; }
 +if [[ ! -d ${ED}${DESTTREE}/sbin ]] ; then
-       install -d "${ED}${DESTTREE}/sbin" || exit 2
++      install -d "${ED}${DESTTREE}/sbin" || { helpers_die "$0: failed to install ${ED}${DESTTREE}/sbin"; exit 2; }
  fi
  
  ret=0
index 0a138a4904acd7ee81e14814666eec613affe2c7,1015a28e577a212f2aefb7ff1de9b294dccfb2d0..ce4b84c57550ed3b2527ffa3fa814bb94d87d256
@@@ -2,16 -2,17 +2,20 @@@
  # Copyright 1999-2006 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
++source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
+ 
  if [[ $# -ne 2 ]] ; then
-       echo "$0: two arguments needed" 1>&2
+       helpers_die "$0: two arguments needed"
        exit 1
  fi
  
 -destdir=${2%/*}
 -[[ ! -d ${D}${destdir} ]] && dodir "${destdir}"
 +target="${1}"
 +linkname="${2}"
 +[[ ${target:0:1} == "/" ]] && target="${EPREFIX}${target}"
 +destdir=${linkname%/*}
 +[[ ! -d ${ED}${destdir} ]] && dodir "${destdir}"
  
- exec ln -snf "${target}" "${ED}/${linkname}"
- 
 -ln -snf "$1" "${D}$2"
++ln -snf "${target}" "${ED}/${linkname}"
+ ret=$?
+ [[ $ret -ne 0 ]] && helpers_die "$0 failed"
+ exit $ret
index 87999c3c2b2c48aa850337cc2cb2d2cd80eb8ce4,8e6fc9c8d86b2ca844231fbef17891d2cdd69d38..ab952c16d4a2c0f74ca4ead84a9811fa59b4cb4a
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2007 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
  
  if [[ -z $1 ]] ; then
-       vecho "${0##*/}: at least one argument needed" 1>&2
+       helpers_die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
index ffb60281b73e2ae728cd1ae2a5621ba0e45e8ec5,fdecaf0a23b36cc8168c92f382179f7552ea2385..7608202f31558e6e2e907c10fc8ebca5f65b3519
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2007 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
  
  if [[ -z $1 ]] ; then
-       vecho "${0##*/}: at least one argument needed" 1>&2
+       helpers_die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
@@@ -20,8 -20,11 +20,11 @@@ case $1 i
        --queue)
                shift
                set -- "${@/%/.ecompress.dir}"
 -              set -- "${@/#/${D}}"
 +              set -- "${@/#/${ED}}"
-               exec touch "$@"
+               touch "$@"
+               ret=$?
+               [[ $ret -ne 0 ]] && helpers_die "$0 failed"
+               exit $?
                ;;
        --dequeue)
                [[ -n $2 ]] && vecho "${0##*/}: --dequeue takes no additional arguments" 1>&2
index d302091c1db4e11bc7917356d869f580f50a3484,7103585ce3bd9078aafc427e42a2b2b5b215007e..78582da9d44022f996fdf0526e7b4545ad595b63
@@@ -21,4 -21,7 +21,7 @@@ if [[ $PORTAGE_QUIET != 1 ]] ; the
        ) >&2
  fi
  
- exec ${MAKE:-make} SHELL="${BASH:-/bin/bash}" ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
 -${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
++${MAKE:-make} SHELL="${BASH:-/bin/bash}" ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
+ ret=$?
+ [[ $ret -ne 0 ]] && helpers_die "$0 failed"
+ exit $ret
index 99be171a16d5dd96d1ea95f128783a2e1d484136,95a49fdad0d1ee7b2986f59df833f24e83c51ba2..962f66c8013f22df02e2f6d837c3904838e2da68
@@@ -2,7 -2,12 +2,12 @@@
  # Copyright 1999-2007 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
++source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
+ 
  # we can't prefix all arguments because
  # chown takes random options
  slash="/"
- exec chown "${@/#${slash}/${ED}${slash}}"
 -chown "${@/#${slash}/${D}${slash}}"
++chown "${@/#${slash}/${ED}${slash}}"
+ ret=$?
+ [[ $ret -ne 0 ]] && helpers_die "$0 failed"
+ exit $ret
index 0450af12808510cf83e13067e76a370b59d0ea9d,cdd409a057aba40c54b9df34db46aaec1976f234..322809038afe3c0105f8741a925a2e6674f37601
@@@ -2,7 -2,12 +2,12 @@@
  # Copyright 1999-2007 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
++source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
+ 
  # we can't prefix all arguments because
  # chmod takes random options
  slash="/"
- exec chmod "${@/#${slash}/${ED}${slash}}"
 -chmod "${@/#${slash}/${D}${slash}}"
++chmod "${@/#${slash}/${ED}${slash}}"
+ ret=$?
+ [[ $ret -ne 0 ]] && helpers_die "$0 failed"
+ exit $ret
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 575390091e59984e1cd9aa31e8427d252d9746a2,ec30b66cbef86e1a6aff501870bdc9b2668b2301..39ccb09dd4b804075b22b02667bcaeb57f980858
@@@ -1,10 -1,8 +1,8 @@@
 -#!/bin/bash
 +#!@PORTAGE_BASH@
- # Copyright 2009 Gentoo Foundation
+ # Copyright 2009-2010 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}
 -PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
 +PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}
 +PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym}
- # Set EPYTHON variable as empty so that dohtml doesn't try
- # to use potentially unsupported version of Python.
- EPYTHON= PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
-       exec "$PORTAGE_BIN_PATH/portageq" "$@"
+ PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
 -      exec "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/portageq" "$@"
++      exec "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/portageq" "$@"
diff --cc bin/ebuild-ipc
index 0000000000000000000000000000000000000000,43e4a02aef415648136ae391212c77a3ab67be00..5bd7da1e2b656c2cb697bc9c352d8d855e6a4298
mode 000000,100755..100755
--- /dev/null
@@@ -1,0 -1,8 +1,8 @@@
 -#!/bin/bash
++#!@PORTAGE_BASH@
+ # Copyright 2010 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+ 
+ PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}
+ PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
+ PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
 -      exec "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/ebuild-ipc.py" "$@"
++      exec "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/ebuild-ipc.py" "$@"
index 0000000000000000000000000000000000000000,d0c17d037bdc2c48961fabde040ad1c84ea6048e..ccbb23a304ee9969abe8a35abf7c8ed1f31a183a
mode 000000,100755..100755
--- /dev/null
@@@ -1,0 -1,76 +1,76 @@@
 -#!/usr/bin/python
++#!@PORTAGE_PYTHON@
+ # Copyright 2010 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+ #
+ # This is a helper which which ebuild processes can use
+ # to communicate with portage's main python process.
+ 
+ import os
+ import pickle
+ import select
+ import signal
+ import sys
+ 
+ def debug_signal(signum, frame):
+       import pdb
+       pdb.set_trace()
+ signal.signal(signal.SIGUSR1, debug_signal)
+ 
+ # Avoid sandbox violations after python upgrade.
+ pym_path = os.path.join(os.path.dirname(
+       os.path.dirname(os.path.realpath(__file__))), "pym")
+ if os.environ.get("SANDBOX_ON") == "1":
+       sandbox_write = os.environ.get("SANDBOX_WRITE", "").split(":")
+       if pym_path not in sandbox_write:
+               sandbox_write.append(pym_path)
+               os.environ["SANDBOX_WRITE"] = \
+                       ":".join(filter(None, sandbox_write))
+ 
+ import portage
+ 
+ class EbuildIpc(object):
+ 
+       def __init__(self):
+               self.fifo_dir = os.environ['PORTAGE_BUILDDIR']
+               self.ipc_in_fifo = os.path.join(self.fifo_dir, '.ipc_in')
+               self.ipc_out_fifo = os.path.join(self.fifo_dir, '.ipc_out')
+               self.ipc_lock_file = os.path.join(self.fifo_dir, '.ipc_lock')
+ 
+       def communicate(self, args):
+               # Make locks quiet since unintended locking messages displayed on
+               # stdout could corrupt the intended output of this program.
+               portage.locks._quiet = True
+               lock_obj = portage.locks.lockfile(self.ipc_lock_file, unlinkfile=True)
+               try:
+                       return self._communicate(args)
+               finally:
+                       portage.locks.unlockfile(lock_obj)
+ 
+       def _communicate(self, args):
+               input_fd = os.open(self.ipc_out_fifo, os.O_RDONLY|os.O_NONBLOCK)
+               input_file = os.fdopen(input_fd, 'rb')
+               output_file = open(self.ipc_in_fifo, 'wb')
+               pickle.dump(args, output_file)
+               output_file.flush()
+ 
+               events = select.select([input_file], [], [])
+               reply = pickle.load(input_file)
+               output_file.close()
+               input_file.close()
+ 
+               (out, err, rval) = reply
+ 
+               if out:
+                       portage.util.writemsg_stdout(out, noiselevel=-1)
+ 
+               if err:
+                       portage.util.writemsg(err, noiselevel=-1)
+ 
+               return rval
+ 
+ def ebuild_ipc_main(args):
+       ebuild_ipc = EbuildIpc()
+       return ebuild_ipc.communicate(args)
+ 
+ if __name__ == '__main__':
+       sys.exit(ebuild_ipc_main(sys.argv[1:]))
diff --cc bin/ebuild.sh
index b6599341dd30e07357389404d1072175b39e0d87,8813bd6d0b8d89023bc3a3dbd28b3a089afb8564..3e9b76730f6d5f34138108321a556f4144dcc538
@@@ -1,9 -1,9 +1,9 @@@
 -#!/bin/bash
 +#!@PORTAGE_BASH@
- # Copyright 1999-2009 Gentoo Foundation
+ # Copyright 1999-2010 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"
 -PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}"
 +PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"
 +PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym}"
  
  # Don't use sandbox's BASH_ENV for new shells because it does
  # 'source /etc/profile' which can interfere with the build
@@@ -169,10 -159,13 +165,13 @@@ has_version() 
                die "portageq calls (has_version calls portageq) are not allowed in the global scope"
        fi
  
-       # Set EPYTHON variable as empty so that portageq doesn't try
-       # to use potentially unsupported version of Python.
-       EPYTHON= PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
-       "${PORTAGE_BIN_PATH}"/portageq has_version "${ROOT}" "$1"
+       if [[ -n $PORTAGE_IPC_DAEMON ]] ; then
+               "$PORTAGE_BIN_PATH"/ebuild-ipc has_version "$ROOT" "$1" "$USE"
+               return $?
+       fi
+ 
+       PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
 -      "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH}/portageq" has_version "${ROOT}" "$1"
++      "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}/portageq" has_version "${ROOT}" "$1"
        local retval=$?
        case "${retval}" in
                0)
@@@ -192,10 -185,8 +191,8 @@@ portageq() 
                die "portageq calls are not allowed in the global scope"
        fi
  
-       # Set EPYTHON variable as empty so that portageq doesn't try
-       # to use potentially unsupported version of Python.
-       EPYTHON= PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
-       "${PORTAGE_BIN_PATH}/portageq" "$@"
+       PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
 -      "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH}/portageq" "$@"
++      "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}/portageq" "$@"
  }
  
  
@@@ -211,10 -202,13 +208,13 @@@ best_version() 
                die "portageq calls (best_version calls portageq) are not allowed in the global scope"
        fi
  
-       # Set EPYTHON variable as empty so that portageq doesn't try
-       # to use potentially unsupported version of Python.
-       EPYTHON= PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
-       "${PORTAGE_BIN_PATH}/portageq" 'best_version' "${ROOT}" "$1"
+       if [[ -n $PORTAGE_IPC_DAEMON ]] ; then
+               "$PORTAGE_BIN_PATH"/ebuild-ipc best_version "$ROOT" "$1" "$USE"
+               return $?
+       fi
+ 
+       PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
 -      "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH}/portageq" 'best_version' "${ROOT}" "$1"
++      "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}/portageq" 'best_version' "${ROOT}" "$1"
        local retval=$?
        case "${retval}" in
                0)
@@@ -784,8 -776,13 +782,18 @@@ into() 
                export DESTTREE=""
        else
                export DESTTREE=$1
++<<<<<<< HEAD
 +              if [ ! -d "${ED}${DESTTREE}" ]; then
 +                      install -d "${ED}${DESTTREE}"
++=======
+               if [ ! -d "${D}${DESTTREE}" ]; then
+                       install -d "${D}${DESTTREE}"
+                       local ret=$?
+                       if [[ $ret -ne 0 ]] ; then
+                               helpers_die "$0 failed"
+                               return $ret
+                       fi
++>>>>>>> overlays-gentoo-org/master
                fi
        fi
  }
@@@ -795,8 -792,13 +803,13 @@@ insinto() 
                export INSDESTTREE=""
        else
                export INSDESTTREE=$1
 -              if [ ! -d "${D}${INSDESTTREE}" ]; then
 -                      install -d "${D}${INSDESTTREE}"
 +              if [ ! -d "${ED}${INSDESTTREE}" ]; then
 +                      install -d "${ED}${INSDESTTREE}"
+                       local ret=$?
+                       if [[ $ret -ne 0 ]] ; then
+                               helpers_die "$0 failed"
+                               return $ret
+                       fi
                fi
        fi
  }
@@@ -806,8 -808,13 +819,13 @@@ exeinto() 
                export _E_EXEDESTTREE_=""
        else
                export _E_EXEDESTTREE_="$1"
 -              if [ ! -d "${D}${_E_EXEDESTTREE_}" ]; then
 -                      install -d "${D}${_E_EXEDESTTREE_}"
 +              if [ ! -d "${ED}${_E_EXEDESTTREE_}" ]; then
 +                      install -d "${ED}${_E_EXEDESTTREE_}"
+                       local ret=$?
+                       if [[ $ret -ne 0 ]] ; then
+                               helpers_die "$0 failed"
+                               return $ret
+                       fi
                fi
        fi
  }
@@@ -817,8 -824,13 +835,13 @@@ docinto() 
                export _E_DOCDESTTREE_=""
        else
                export _E_DOCDESTTREE_="$1"
 -              if [ ! -d "${D}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" ]; then
 -                      install -d "${D}usr/share/doc/${PF}/${_E_DOCDESTTREE_}"
 +              if [ ! -d "${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" ]; then
 +                      install -d "${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}"
+                       local ret=$?
+                       if [[ $ret -ne 0 ]] ; then
+                               helpers_die "$0 failed"
+                               return $ret
+                       fi
                fi
        fi
  }
@@@ -1703,7 -1729,7 +1732,7 @@@ filter_readonly_variables() 
                "
        fi
  
-       EPYTHON= "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${filtered_vars}" || die "filter-bash-environment.py failed"
 -      "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${filtered_vars}" || die "filter-bash-environment.py failed"
++      "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${filtered_vars}" || die "filter-bash-environment.py failed"
  }
  
  # @FUNCTION: preprocess_ebuild_env
@@@ -2194,9 -2227,11 +2225,11 @@@ elif [[ -n $EBUILD_SH_ARGS ]] ; the
                        umask 002
                        save_ebuild_env | filter_readonly_variables > "$T/environment"
                        assert "save_ebuild_env failed"
 -                      chown portage:portage "$T/environment" &>/dev/null
 +                      chown ${PORTAGE_USER:-portage}:${PORTAGE_GROUP:-portage} "$T/environment" &>/dev/null
                        chmod g+w "$T/environment" &>/dev/null
                fi
+               [[ -n $PORTAGE_EBUILD_EXIT_FILE ]] && > "$PORTAGE_EBUILD_EXIT_FILE"
+               [[ -n $PORTAGE_IPC_DAEMON ]] && "$PORTAGE_BIN_PATH"/ebuild-ipc exit 0
                exit 0
        )
        exit $?
Simple merge
Simple merge
index 3c2277d6119be1329493dbe90b8cb06fc02d77b2,3a199bdf7a72421430a6e46744f97d769481b28d..922098fee264020f65c2ee296238120e956e6a78
mode 100644,100755..100644
@@@ -1,5 -1,5 +1,5 @@@
 -#!/bin/bash
 +#!@PORTAGE_BASH@
- # Copyright 1999-2009 Gentoo Foundation
+ # Copyright 1999-2010 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  #
  # Miscellaneous shell functions that make use of the ebuild env but don't need
@@@ -444,11 -404,7 +444,11 @@@ install_qa_check_misc() 
        [[ ${abort} == "yes" ]] && die "add those ldscripts"
  
        # Make sure people don't store libtool files or static libs in /lib
-       # on AIX, "dynamic libs" have extention .a, so don't get false
 -      f=$(ls "${D}"lib*/*.{a,la} 2>/dev/null)
++      # on AIX, "dynamic libs" have extension .a, so don't get false
 +      # positives
 +      [[ ${CHOST} == *-aix* ]] \
 +              && f=$(ls "${ED}"lib*/*.la 2>/dev/null || true) \
 +              || f=$(ls "${ED}"lib*/*.{a,la} 2>/dev/null)
        if [[ -n ${f} ]] ; then
                vecho -ne '\a\n'
                eqawarn "QA Notice: Excessive files found in the / partition"
                done
                [[ $reset_debug = 1 ]] && set -x
                f=$(cat "${PORTAGE_LOG_FILE}" | \
-                       EPYTHON= "$PORTAGE_BIN_PATH"/check-implicit-pointer-usage.py || die "check-implicit-pointer-usage.py failed")
 -                      "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH"/check-implicit-pointer-usage.py || die "check-implicit-pointer-usage.py failed")
++                      "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH"/check-implicit-pointer-usage.py || die "check-implicit-pointer-usage.py failed")
                if [[ -n ${f} ]] ; then
  
                        # In the future this will be a forced "die". In preparation,
@@@ -1469,8 -778,8 +1488,8 @@@ dyn_package() 
        tar $tar_options -cf - $PORTAGE_BINPKG_TAR_OPTS -C "${D}" . | \
                bzip2 -cf > "$PORTAGE_BINPKG_TMPFILE"
        assert "failed to pack binary package: '$PORTAGE_BINPKG_TMPFILE'"
-       EPYTHON= PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
-               "$PORTAGE_BIN_PATH"/xpak-helper.py recompose \
+       PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
 -              "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH"/xpak-helper.py recompose \
++              "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH"/xpak-helper.py recompose \
                "$PORTAGE_BINPKG_TMPFILE" "$PORTAGE_BUILDDIR/build-info"
        if [ $? -ne 0 ]; then
                rm -f "${PORTAGE_BINPKG_TMPFILE}"
diff --cc bin/portageq
Simple merge
diff --cc bin/quickpkg
Simple merge
diff --cc bin/repoman
index 30880466ef019f1d42c9c597fcb5ced82d1f952c,740b92e78ade6116b84fd15c5f74691e4c220e33..8abb768cdf6af9a5bbfc49e5dbd16089ff2706b9
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python -O
 +#!@PORTAGE_PYTHON@ -O
- # Copyright 1999-2006 Gentoo Foundation
+ # Copyright 1999-2010 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
  # Next to do: dep syntax checking in mask files
@@@ -32,20 -30,25 +30,27 @@@ except ImportError
  from itertools import chain
  from stat import S_ISDIR
  
- if not hasattr(__builtins__, "set"):
-       from sets import Set as set
- 
- 
 -try:
 -      import portage
 -except ImportError:
 -      from os import path as osp
 -      sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
 -      import portage
 +# for an explanation on this logic, see pym/_emerge/__init__.py
 +import os
 +import sys
 +if os.environ.__contains__("PORTAGE_PYTHONPATH"):
 +      sys.path.insert(0, os.environ["PORTAGE_PYTHONPATH"])
 +else:
 +      sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "pym"))
 +import portage
- 
  portage._disable_legacy_globals()
+ 
+ try:
+       import xml.etree.ElementTree
+       from xml.parsers.expat import ExpatError
+ except ImportError:
+       msg = ["Please enable python's \"xml\" USE flag in order to use repoman."]
+       from portage.output import EOutput
+       out = EOutput()
+       for line in msg:
+               out.eerror(line)
+       sys.exit(1)
+ 
  from portage import os
  from portage import subprocess_getstatusoutput
  from portage import _encodings
index 0721e4f642ab2505b471f617fbd89ae5a1cb8870,1671c4ef777f459367f6bb48794ee75489d30383..f8781c786fd7542ebbba87938fec1377b9c15a8c
@@@ -6,9 -6,9 +6,10 @@@ import sy
  from itertools import chain
  import portage
  from portage.cache.mappings import slot_dict_class
- from portage.dep import isvalidatom, paren_reduce, use_reduce, \
-       paren_normalize, paren_enclose, _slot_re
+ from portage.dep import isvalidatom, use_reduce, \
+       paren_enclose, _slot_re
+ from portage.eapi import eapi_has_iuse_defaults, eapi_has_required_use
 +from portage.const import EPREFIX
  from _emerge.Task import Task
  
  if sys.hexversion >= 0x3000000:
@@@ -31,7 -31,7 +32,7 @@@ class Package(Task)
                "INHERITED", "IUSE", "KEYWORDS",
                "LICENSE", "PDEPEND", "PROVIDE", "RDEPEND",
                "repository", "PROPERTIES", "RESTRICT", "SLOT", "USE",
-               "_mtime_", "DEFINED_PHASES", "EPREFIX"]
 -              "_mtime_", "DEFINED_PHASES", "REQUIRED_USE"]
++              "_mtime_", "DEFINED_PHASES", "REQUIRED_USE", "EPREFIX"]
  
        def __init__(self, **kwargs):
                Task.__init__(self, **kwargs)
Simple merge
index 8ff62829286d0d9dafbe1ed19443640abeb664a0,643cc3edfa996a88848758417af9a2ea1fe1bf43..caa707464430efedf32d1fcb18886b8304e39914
@@@ -6171,12 -6054,22 +6054,28 @@@ def _get_masking_status(pkg, pkgsetting
                                        mreasons.append(
                                                _MaskReason("invalid", "invalid: %s" % (msg,)))
  
+               if pkg.metadata["REQUIRED_USE"] and \
+                       eapi_has_required_use(pkg.metadata["EAPI"]):
+                       required_use = pkg.metadata["REQUIRED_USE"]
+                       use = pkg.use.enabled
+                       iuse = pkgsettings._get_implicit_iuse()
+                       iuse.update(pkg.iuse.all)
+                       try:
+                               required_use_is_sat = portage.dep.check_required_use(
+                                       required_use, use, iuse)
+                       except portage.exception.InvalidDependString:
+                               mreasons.append("invalid: REQUIRED_USE")
+                       else:
+                               if not required_use_is_sat:
+                                       msg = "violated use flag constraints: '%s'" % required_use
+                                       mreasons.append(msg)
+ 
 +      if pkg.built and not pkg.installed:
 +              if not "EPREFIX" in pkg.metadata or not pkg.metadata["EPREFIX"]:
 +                      mreasons.append("missing EPREFIX")
 +              elif len(pkg.metadata["EPREFIX"].strip()) < len(pkgsettings["EPREFIX"]):
 +                      mreasons.append("EPREFIX: '%s' too small" % pkg.metadata["EPREFIX"])
 +
        if not pkg.metadata["SLOT"]:
                mreasons.append(
                        _MaskReason("invalid", "SLOT: undefined"))
Simple merge
Simple merge
index 7fe1539d02dc04e70b83abd825aa996ab3344c90,d84031681b0646882578e1396ca0a1cb044a513c..ba18080e5fc76b12a2936b2187f12db2ddcdda42
@@@ -18,9 -18,9 +18,10 @@@ portage.proxy.lazyimport.lazyimport(glo
  
  from portage.cache.mappings import slot_dict_class
  from portage.dbapi.virtual import fakedbapi
+ from portage.dep import use_reduce, paren_enclose
  from portage.exception import InvalidPackageName, \
        PermissionDenied, PortageException
 +from portage.const import EAPI
  from portage.localization import _
  
  from portage import _movefile
@@@ -56,7 -55,7 +56,7 @@@ class bindbapi(fakedbapi)
                        ["BUILD_TIME", "CHOST", "DEPEND", "EAPI", "IUSE", "KEYWORDS",
                        "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE",
                        "RDEPEND", "repository", "RESTRICT", "SLOT", "USE", "DEFINED_PHASES",
-                       "EPREFIX"])
 -                      "REQUIRED_USE"])
++                      "REQUIRED_USE", "EPREFIX"])
                self._aux_cache_slot_dict = slot_dict_class(self._aux_cache_keys)
                self._aux_cache = {}
  
@@@ -227,7 -226,7 +227,7 @@@ class binarytree(object)
                                ["BUILD_TIME", "CHOST", "DEPEND", "DESCRIPTION", "EAPI",
                                "IUSE", "KEYWORDS", "LICENSE", "PDEPEND", "PROPERTIES",
                                "PROVIDE", "RDEPEND", "repository", "SLOT", "USE", "DEFINED_PHASES",
-                               "EPREFIX"]
 -                              "REQUIRED_USE"]
++                              "REQUIRED_USE", "EPREFIX"]
                        self._pkgindex_aux_keys = list(self._pkgindex_aux_keys)
                        self._pkgindex_use_evaluated_keys = \
                                ("LICENSE", "RDEPEND", "DEPEND",
                                "RESTRICT": "",
                                "SLOT"    : "0",
                                "USE"     : "",
-                               "DEFINED_PHASES" : ""
+                               "DEFINED_PHASES" : "",
+                               "REQUIRED_USE" : ""
                        }
 -                      self._pkgindex_inherited_keys = ["CHOST", "repository"]
 +                      self._pkgindex_inherited_keys = ["CHOST", "repository", "EPREFIX"]
                        self._pkgindex_default_header_data = {
                                "repository":""
                        }
Simple merge
index 9927c9744ddad34bc691f721657186d18b891d14,9089ffb4504eea1210a25f72c585ab3c9c1c809c..ed4dbe4e06880f3d4c2e08128d4e545a2b258823
@@@ -2659,11 -2654,10 +2660,11 @@@ class config(object)
                        mydict.pop("AA", None)
  
                # Prefix variables are supported starting with EAPI 3.
 -              if phase == 'depend' or eapi is None or not eapi_supports_prefix(eapi):
 -                      mydict.pop("ED", None)
 -                      mydict.pop("EPREFIX", None)
 -                      mydict.pop("EROOT", None)
 +              # but during transition, we just support them anywhere
-               #if phase == 'depend' or eapi in (None, "0", "1", "2"):
-               #       mydict.pop("ED", None)
-               #       mydict.pop("EPREFIX", None)
-               #       mydict.pop("EROOT", None)
++#             if phase == 'depend' or eapi is None or not eapi_supports_prefix(eapi):
++#                     mydict.pop("ED", None)
++#                     mydict.pop("EPREFIX", None)
++#                     mydict.pop("EROOT", None)
  
                if phase == 'depend':
                        mydict.pop('FILESDIR', None)
Simple merge
diff --cc runtests.sh
index 0000000000000000000000000000000000000000,2ba05e3e2666927a87d51ac1c7983fb08dc038fc..b6d437564d48b609a20afa88728e643e32ee8fcb
mode 000000,100755..100755
--- /dev/null
@@@ -1,0 -1,30 +1,30 @@@
 -#!/bin/bash
++#!@PORTAGE_BASH@
+ 
+ PYTHON_VERSIONS="2.6 2.7 3.1 3.2"
+ 
+ case "${NOCOLOR:-false}" in
+       yes|true)
+               GOOD=
+               BAD=
+               NORMAL=
+               ;;
+       no|false)
+               GOOD=$'\e[1;32m'
+               BAD=$'\e[1;31m'
+               NORMAL=$'\e[0m'
+               ;;
+ esac
+ 
+ exit_status="0"
+ for version in ${PYTHON_VERSIONS}; do
 -      if [[ -x /usr/bin/python${version} ]]; then
++      if [[ -x @PORTAGE_PYTHON@${version} ]]; then
+               echo -e "${GOOD}Testing with Python ${version}...${NORMAL}"
 -              if ! PYTHONPATH="pym${PYTHONPATH:+:}${PYTHONPATH}" /usr/bin/python${version} pym/portage/tests/runTests; then
++              if ! PYTHONPATH="pym${PYTHONPATH:+:}${PYTHONPATH}" @PORTAGE_PYTHON@${version} pym/portage/tests/runTests; then
+                       echo -e "${BAD}Testing with Python ${version} failed${NORMAL}"
+                       exit_status="1"
+               fi
+               echo
+       fi
+ done
+ 
+ exit ${exit_status}