Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
authorFabian Groffen <grobian@gentoo.org>
Wed, 26 Sep 2012 18:24:34 +0000 (20:24 +0200)
committerFabian Groffen <grobian@gentoo.org>
Wed, 26 Sep 2012 18:24:34 +0000 (20:24 +0200)
Conflicts:
bin/ebuild-helpers/doconfd
bin/ebuild-helpers/doenvd
bin/ebuild-helpers/doinitd
bin/isolated-functions.sh
bin/misc-functions.sh
cnf/make.globals
pym/portage/dbapi/bintree.py
pym/portage/dbapi/vartree.py

54 files changed:
1  2 
bin/bashrc-functions.sh
bin/dohtml.py
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/newins
bin/ebuild-helpers/prepalldocs
bin/ebuild-helpers/prepinfo
bin/ebuild-helpers/prepstrip
bin/ebuild.sh
bin/egencache
bin/emerge-webrsync
bin/isolated-functions.sh
bin/misc-functions.sh
bin/phase-functions.sh
bin/phase-helpers.sh
bin/portageq
bin/repoman
bin/save-ebuild-env.sh
cnf/make.globals
man/emerge.1
man/make.conf.5
pym/_emerge/Package.py
pym/_emerge/actions.py
pym/_emerge/depgraph.py
pym/_emerge/main.py
pym/portage/__init__.py
pym/portage/const.py
pym/portage/dbapi/bintree.py
pym/portage/dbapi/vartree.py
pym/portage/package/ebuild/_config/special_env_vars.py
pym/portage/package/ebuild/config.py
pym/portage/package/ebuild/doebuild.py
pym/portage/package/ebuild/fetch.py
pym/portage/util/__init__.py
pym/portage/util/env_update.py
pym/portage/versions.py

Simple merge
diff --cc bin/dohtml.py
Simple merge
index 922e600c786597ac5974720f3dffb6956b54660f,06ae0c779e16f4df0a3036657759cc3b043fdffb..3d81c2d286a567ea5745cb0427e8de43d8a566eb
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2011 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
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
index 42f3e429f422f5f10e39f48c8e6d2ba8acf90337,a3c09a50eb6bd3505a6d3851ef4104cd3e5e3d2a..d0d3901ec28c7fc2e70bd8cc00f2058e5f089b6a
@@@ -3,8 -3,8 +3,8 @@@
  # Distributed under the terms of the GNU General Public License v2
  
  if [[ $# -lt 1 ]] ; then
 -      source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 +      source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
Simple merge
index 4b9c8b95f527fb701fddca170fafab9ffe4baeeb,2b0533febbd1fbbda2e8e3c4efb04c0c1df69057..7f5e364a437beb1efd7299ffebac08d91544af79
@@@ -13,10 -13,10 +13,10 @@@ case "${EAPI}" i
                ;;
  esac
  
 -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
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1  
  fi
  
index 31c57d55a8de926daacef5c934b3e71f4bdbda89,9287933a9a7f8339a0d8364263c2d7cb9d13ee05..c4fae04373a7dee13b08bc264bc12cb310e5095f
@@@ -3,8 -3,8 +3,8 @@@
  # Distributed under the terms of the GNU General Public License v2
  
  if [[ $# -lt 1 ]] ; then
 -      source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 +      source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
index 05a8759f944aa491ccdfecb0583df6403c5d1ec8,efbf638fc9227f63ec460d95ebd4a1c699700c00..9c845ca0ee89db842c879767bb437c98d97376f4
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2011 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
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
index b3a3c7a1eb1c417847b63030539ec352e9fc742a,aec5e79bd0af2c917c8b9ab8cc7b956f932322a3..4f102b085723e8a85408b21e6ed1d811077cbe85
@@@ -2,13 -2,13 +2,13 @@@
  # 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}
  PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
 -      "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
 +      "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
  
  ret=$?
- [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+ [[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
  exit $ret
index 4597b2ef01c64a6054d4c25a246e4117700aae5e,e4ccc90d99202aeb4380cfd706b9a675ffe0626a..db49bedce36e6d5423ea1c230fde3aec6b7993d3
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2011 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
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1  
  fi
  
index 9eefa52094f2dc67f5ebc9351bdb2b563c76e2a4,476b858f6dcb0b1ffaf59a8a5991b17347718c58..8e99fa888e325688ad1e1657b357f201c3e6c6f4
@@@ -3,8 -3,8 +3,8 @@@
  # Distributed under the terms of the GNU General Public License v2
  
  if [[ $# -lt 1 ]] ; then
 -      source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 +      source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
index 511eb17b92aa76c3887ca0bc07b88827acb04304,c534f3f397bc42da84ea42a7f5faef6528e46dd3..343a150b2c1b612c7f5f64b1fbef5f3ba02576b9
@@@ -33,22 -33,13 +33,22 @@@ f
        case "$EAPI" in 0|1|2) export ED="${D}" ;; esac
  
  if [[ ${INSDESTTREE#${ED}} != "${INSDESTTREE}" ]]; then
-       vecho "-------------------------------------------------------" 1>&2
-       vecho "You should not use \${D} or \${ED} with helpers." 1>&2
-       vecho "  --> ${INSDESTTREE}" 1>&2
-       vecho "-------------------------------------------------------" 1>&2
-       helpers_die "${helper} used with \${D} or \${ED}"
+       __vecho "-------------------------------------------------------" 1>&2
+       __vecho "You should not use \${D} or \${ED} with helpers." 1>&2
+       __vecho "  --> ${INSDESTTREE}" 1>&2
+       __vecho "-------------------------------------------------------" 1>&2
+       __helpers_die "${helper} used with \${D} or \${ED}"
        exit 1
  fi
 +# PREFIX LOCAL: check for usage with EPREFIX
 +if [[ ${INSDESTTREE#${EPREFIX}} != "${INSDESTTREE}" ]]; then
 +      vecho "-------------------------------------------------------" 1>&2
 +      vecho "You should not use \${EPREFIX} with helpers." 1>&2
 +      vecho "  --> ${INSDESTTREE}" 1>&2
 +      vecho "-------------------------------------------------------" 1>&2
 +      exit 1
 +fi
 +# END PREFIX LOCAL
  
  case "$EAPI" in
        0|1|2|3)
Simple merge
index 96735f771e0188d57bbef20826fa9116c66c239e,c10296b34139fafe75713488a378fd993386c9f6..dd5440d7bc929fb741078e3081059e70e7f13b76
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2011 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
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
Simple merge
index 694953de7dd66cb3c9a39f7601f7c4ee6f1de937,edc45846507c6f7816767f0f0f34aca3e4e5ff25..9765b75292e1c486b30f429f50d73193fdcb332c
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2011 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
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
index b96f845210b8c99854903ae547669f927ee227d5,34637c2f78886c06d59f2b71a557627d2876333d..a98d053b0860d171a7120566df9311ee7bc11b45
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2012 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
-       helpers_die "${0##*/}: two arguments needed"
+       __helpers_die "${0##*/}: two arguments needed"
        exit 1
  fi
  
index fe974ccb59e92c0f5876e2722ac5d914676f122d,71287b4b07f1c82b03ba9508f981946d74859d4c..6614cdc5a7e61130352e2febc8521ed23e1f0fbf
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-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
  
  if [[ -z $1 ]] ; then
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
index bf76b1f1a6de31f1ed80367236bb5e07e80b5f8c,097ade2bc10934699e9b7b2182e0214972974514..464dd378c7860d2f2fa18b76bdd20de2219bc2e1
@@@ -2,10 -2,10 +2,10 @@@
  # Copyright 1999-2011 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/helper-functions.sh
 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/helper-functions.sh
  
  if [[ -z $1 ]] ; then
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
  fi
  
index 197e0dabba38191baf87d67c622434b1bcf5da7f,69d836f1aa6e8e71e40e510ccc3a088abb1c75ed..60286ec9dedd054549be424ca9d764b92e5a8024
@@@ -22,7 -22,7 +22,7 @@@ if [[ $PORTAGE_QUIET != 1 ]] ; the
        ) >&2
  fi
  
 -${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
 +${MAKE:-make} SHELL="${BASH:-/bin/bash}" ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
  ret=$?
- [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+ [[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
  exit $ret
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc bin/ebuild.sh
Simple merge
diff --cc bin/egencache
Simple merge
index cdcf716def783c760d0378bfa1aeab3ba793f90d,09b75746c1a78f7b1f74c615b42f709908dc3ffb..10ce71dce181bbaf0677c5e9d89dff5c45cf558a
@@@ -196,11 -189,9 +196,11 @@@ get_snapshot_timestamp() 
  sync_local() {
        local file="$1"
  
-       vecho "Syncing local tree ..."
+       __vecho "Syncing local tree ..."
  
 -      local ownership="portage:portage"
 +      # PREFIX LOCAL: use PORTAGE_USER and PORTAGE_GROUP
 +      local ownership="${PORTAGE_USER:-portage}:${PORTAGE_GROUP:-portage}"
 +      # END PREFIX LOCAL
        if has usersync ${FEATURES} ; then
                case "${USERLAND}" in
                        BSD)
Simple merge
index 8c6a12683a8ac2f4d8c25c8d9e1f44fe5d596771,55d37f29d2ac4e7de8becead69a731cf795ae79f..b66ded412f90305f190f05484354311e3728290c
mode 100644,100755..100644
@@@ -1,5 -1,5 +1,5 @@@
 -#!/bin/bash
 +#!@PORTAGE_BASH@
- # Copyright 1999-2011 Gentoo Foundation
+ # Copyright 1999-2012 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
@@@ -155,12 -165,8 +168,10 @@@ install_qa_check() 
        [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                case "$EAPI" in 0|1|2) local EPREFIX= ED=${D} ;; esac
  
 -      cd "${ED}" || die "cd failed"
 +      # PREFIX LOCAL: ED needs not to exist, whereas D does
 +      cd "${D}" || die "cd failed"
 +      # END PREFIX LOCAL
  
-       # Merge QA_FLAGS_IGNORED and QA_DT_HASH into a single array, since
-       # QA_DT_HASH is deprecated.
        qa_var="QA_FLAGS_IGNORED_${ARCH/-/_}"
        eval "[[ -n \${!qa_var} ]] && QA_FLAGS_IGNORED=(\"\${${qa_var}[@]}\")"
        if [[ ${#QA_FLAGS_IGNORED[@]} -eq 1 ]] ; then
        fi
  
        # Now we look for all world writable files.
 -      local unsafe_files=$(find "${ED}" -type f -perm -2 | sed -e "s:^${ED}:- :")
 +      # PREFIX LOCAL: keep offset in the paths
 +      local unsafe_files=$(find "${ED}" -type f -perm -2 | sed -e "s:^${D}:- :")
 +      # END PREFIX LOCAL
        if [[ -n ${unsafe_files} ]] ; then
-               vecho "QA Security Notice: world writable file(s):"
-               vecho "${unsafe_files}"
-               vecho "- This may or may not be a security problem, most of the time it is one."
-               vecho "- Please double check that $PF really needs a world writeable bit and file bugs accordingly."
+               __vecho "QA Security Notice: world writable file(s):"
+               __vecho "${unsafe_files}"
+               __vecho "- This may or may not be a security problem, most of the time it is one."
+               __vecho "- Please double check that $PF really needs a world writeable bit and file bugs accordingly."
                sleep 1
        fi
  
@@@ -621,13 -565,12 +609,12 @@@ install_qa_check_misc() 
        # this should help to ensure that all (most?) shared libraries are executable
        # and that all libtool scripts / static libraries are not executable
        local j
-       for i in "${ED}"opt/*/lib{,32,64} \
-                "${ED}"lib{,32,64}       \
-                "${ED}"usr/lib{,32,64}   \
-                "${ED}"usr/X11R6/lib{,32,64} ; do
+       for i in "${ED}"opt/*/lib* \
+                "${ED}"lib* \
+                "${ED}"usr/lib* ; do
                [[ ! -d ${i} ]] && continue
  
 -              for j in "${i}"/*.so.* "${i}"/*.so ; do
 +              for j in "${i}"/*.so.* "${i}"/*.so "${i}"/*.dylib "${i}"/*.dll ; do
                        [[ ! -e ${j} ]] && continue
                        [[ -L ${j} ]] && continue
                        [[ -x ${j} ]] && continue
        [[ ${abort} == "yes" ]] && die "add those ldscripts"
  
        # Make sure people don't store libtool files or static libs in /lib
 -      f=$(ls "${ED}"lib*/*.{a,la} 2>/dev/null)
 +      # PREFIX LOCAL: 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)
 +      # END PREFIX LOCAL
        if [[ -n ${f} ]] ; then
-               vecho -ne '\n'
+               __vecho -ne '\n'
                eqawarn "QA Notice: Excessive files found in the / partition"
                eqawarn "${f}"
-               vecho -ne '\n'
+               __vecho -ne '\n'
                die "static archives (*.a) and libtool library files (*.la) do not belong in /"
        fi
  
index 857dc6edf0d54ee8298b08a2cada50c5893707b6,97e762a39f53032a1b5067c1a45192969867b949..a9b014ae14652e6e0b3ec739acb9ce4460dfbdcb
@@@ -137,13 -137,13 +137,13 @@@ __filter_readonly_variables() 
                fi
        fi
  
 -      "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${filtered_vars}" || die "filter-bash-environment.py failed"
 +      "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${filtered_vars}" || die "filter-bash-environment.py failed"
  }
  
- # @FUNCTION: preprocess_ebuild_env
+ # @FUNCTION: __preprocess_ebuild_env
  # @DESCRIPTION:
  # Filter any readonly variables from ${T}/environment, source it, and then
- # save it via save_ebuild_env(). This process should be sufficient to prevent
+ # save it via __save_ebuild_env(). This process should be sufficient to prevent
  # any stale variables or functions from an arbitrary environment from
  # interfering with the current environment. This is useful when an existing
  # environment needs to be loaded from a binary or installed package.
Simple merge
diff --cc bin/portageq
Simple merge
diff --cc bin/repoman
Simple merge
Simple merge
index 17d10253668f16ac860f82e778570219e89d804f,bc69abe1287d5676d074a36e15195523535d6ca8..53c4bb68bbbd566e554ce869d6251c6c210b9eb2
@@@ -66,13 -66,6 +66,12 @@@ FEATURES="assume-digests binpkg-log
  COLLISION_IGNORE="/lib/modules/* *.py[co]"
  UNINSTALL_IGNORE="/lib/modules/*"
  
- # Enable preserve-libs for testing with portage versions that support it.
- # This setting is commented out for portage versions that don't support it.
++# Prefix: we want preserve-libs, not sure how mainline goes about this
 +FEATURES="${FEATURES} preserve-libs"
 +
 +# Force EPREFIX, ED and EROOT to exist in all EAPIs, not just 3 and up
 +FEATURES="${FEATURES} force-prefix"
 +
  # Default chunksize for binhost comms
  PORTAGE_BINHOST_CHUNKSIZE="3000"
  
diff --cc man/emerge.1
Simple merge
diff --cc man/make.conf.5
Simple merge
index fd8539e81750c9f4c63879445aff3bda98da2f7e,b60f74486684f6a269b106e878f8a30ed28eabf1..315811c7a411e37e8053ed39be47a625504cf228
@@@ -12,8 -12,8 +12,9 @@@ from portage.dep import Atom, check_req
  from portage.versions import _pkg_str, _unknown_repo
  from portage.eapi import _get_eapi_attrs
  from portage.exception import InvalidDependString
+ from portage.localization import _
  from _emerge.Task import Task
 +from portage.const import EPREFIX
  
  if sys.hexversion >= 0x3000000:
        basestring = str
@@@ -36,12 -36,14 +37,14 @@@ class Package(Task)
  
        metadata_keys = [
                "BUILD_TIME", "CHOST", "COUNTER", "DEPEND", "EAPI",
-               "INHERITED", "IUSE", "KEYWORDS",
+               "HDEPEND", "INHERITED", "IUSE", "KEYWORDS",
                "LICENSE", "PDEPEND", "PROVIDE", "RDEPEND",
                "repository", "PROPERTIES", "RESTRICT", "SLOT", "USE",
 -              "_mtime_", "DEFINED_PHASES", "REQUIRED_USE"]
 +              "_mtime_", "DEFINED_PHASES", "REQUIRED_USE", "EPREFIX"]
  
-       _dep_keys = ('DEPEND', 'PDEPEND', 'RDEPEND',)
+       _dep_keys = ('DEPEND', 'HDEPEND', 'PDEPEND', 'RDEPEND')
+       _buildtime_keys = ('DEPEND', 'HDEPEND')
+       _runtime_keys = ('PDEPEND', 'RDEPEND')
        _use_conditional_misc_keys = ('LICENSE', 'PROPERTIES', 'RESTRICT')
        UNKNOWN_REPO = _unknown_repo
  
index ae8df10cb17de97355076440535d7dff4c021949,f7ec07ab44780bffab8e18bc37624f3b8958e4f8..c8d04f26dc518ddbf840ecce544d22b295fd70e1
@@@ -30,9 -30,8 +30,9 @@@ from portage import o
  from portage import shutil
  from portage import eapi_is_supported, _unicode_decode
  from portage.cache.cache_errors import CacheError
 +from portage.const import EPREFIX
  from portage.const import GLOBAL_CONFIG_PATH
- from portage.const import _ENABLE_DYN_LINK_MAP
+ from portage.const import _DEPCLEAN_LIB_CHECK_DEFAULT
  from portage.dbapi.dep_expand import dep_expand
  from portage.dbapi._expand_new_virt import expand_new_virt
  from portage.dep import Atom
Simple merge
Simple merge
Simple merge
Simple merge
index a2c4ec475e9cde2d4c56537fb6fac8149f0abcc4,cbcfa728f6936f9ffa5c1eae587bb949802a7717..b182295151138517e110c1e0cd173b06e9410417
@@@ -73,10 -72,11 +73,12 @@@ class bindbapi(fakedbapi)
                self.cpdict={}
                # Selectively cache metadata in order to optimize dep matching.
                self._aux_cache_keys = set(
-                       ["BUILD_TIME", "CHOST", "DEPEND", "EAPI", "IUSE", "KEYWORDS",
+                       ["BUILD_TIME", "CHOST", "DEPEND", "EAPI",
+                       "HDEPEND", "IUSE", "KEYWORDS",
                        "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE",
 -                      "RDEPEND", "repository", "RESTRICT", "SLOT", "USE", "DEFINED_PHASES"
 +                      "RDEPEND", "repository", "RESTRICT", "SLOT", "USE", "DEFINED_PHASES",
-                       "EPREFIX"])
++                      "EPREFIX"
+                       ])
                self._aux_cache_slot_dict = slot_dict_class(self._aux_cache_keys)
                self._aux_cache = {}
  
@@@ -303,22 -303,24 +305,24 @@@ class binarytree(object)
                        self._pkgindex_keys.update(["CPV", "MTIME", "SIZE"])
                        self._pkgindex_aux_keys = \
                                ["BUILD_TIME", "CHOST", "DEPEND", "DESCRIPTION", "EAPI",
-                               "IUSE", "KEYWORDS", "LICENSE", "PDEPEND", "PROPERTIES",
+                               "HDEPEND", "IUSE", "KEYWORDS", "LICENSE", "PDEPEND", "PROPERTIES",
                                "PROVIDE", "RDEPEND", "repository", "SLOT", "USE", "DEFINED_PHASES",
 -                              "BASE_URI"]
 +                              "BASE_URI", "EPREFIX"]
                        self._pkgindex_aux_keys = list(self._pkgindex_aux_keys)
                        self._pkgindex_use_evaluated_keys = \
-                               ("LICENSE", "RDEPEND", "DEPEND",
+                               ("DEPEND", "HDEPEND", "LICENSE", "RDEPEND",
                                "PDEPEND", "PROPERTIES", "PROVIDE")
                        self._pkgindex_header_keys = set([
                                "ACCEPT_KEYWORDS", "ACCEPT_LICENSE",
                                "ACCEPT_PROPERTIES", "CBUILD",
                                "CONFIG_PROTECT", "CONFIG_PROTECT_MASK", "FEATURES",
 -                              "GENTOO_MIRRORS", "INSTALL_MASK", "SYNC", "USE"])
 +                              "GENTOO_MIRRORS", "INSTALL_MASK", "SYNC", "USE", "EPREFIX"])
                        self._pkgindex_default_pkg_data = {
                                "BUILD_TIME"         : "",
+                               "DEFINED_PHASES"     : "",
                                "DEPEND"  : "",
                                "EAPI"    : "0",
+                               "HDEPEND" : "",
                                "IUSE"    : "",
                                "KEYWORDS": "",
                                "LICENSE" : "",
                                "RESTRICT": "",
                                "SLOT"    : "0",
                                "USE"     : "",
-                               "DEFINED_PHASES" : "",
                        }
 -                      self._pkgindex_inherited_keys = ["CHOST", "repository"]
 +                      self._pkgindex_inherited_keys = ["CHOST", "repository", "EPREFIX"]
  
                        # Populate the header with appropriate defaults.
                        self._pkgindex_default_header_data = {
index 5ecdf81b3ea6e814707986bf247e2327d51149c4,f8980f7a0abd4a324e10b8a91744788fa61dcce6..4a01d7a1120fac79f2f0d112e1456f1d5e64893d
@@@ -42,8 -39,7 +42,7 @@@ portage.proxy.lazyimport.lazyimport(glo
  )
  
  from portage.const import CACHE_PATH, CONFIG_MEMORY_FILE, \
 -      PORTAGE_PACKAGE_ATOM, PRIVATE_PATH, VDB_PATH
 +      PORTAGE_PACKAGE_ATOM, PRIVATE_PATH, VDB_PATH, EPREFIX, EPREFIX_LSTRIP, BASH_BINARY
- from portage.const import _ENABLE_DYN_LINK_MAP, _ENABLE_PRESERVE_LIBS
  from portage.dbapi import dbapi
  from portage.exception import CommandNotFound, \
        InvalidData, InvalidLocation, InvalidPackageName, \
@@@ -176,25 -171,9 +175,20 @@@ class vardbapi(dbapi)
                self._counter_path = os.path.join(self._eroot,
                        CACHE_PATH, "counter")
  
-               self._plib_registry = None
-               if _ENABLE_PRESERVE_LIBS:
-                       self._plib_registry = PreservedLibsRegistry(settings["ROOT"],
-                               os.path.join(self._eroot, PRIVATE_PATH,
-                               "preserved_libs_registry"))
-               self._linkmap = None
-               if _ENABLE_DYN_LINK_MAP:
-                       chost = self.settings.get('CHOST')
-                       if not chost:
-                               chost = 'lunix?' # this happens when profiles are not available
-                       if chost.find('darwin') >= 0:
-                               self._linkmap = LinkageMapMachO(self)
-                       elif chost.find('interix') >= 0 or chost.find('winnt') >= 0:
-                               self._linkmap = LinkageMapPeCoff(self)
-                       elif chost.find('aix') >= 0:
-                               self._linkmap = LinkageMapXCoff(self)
-                       else:
-                               self._linkmap = LinkageMap(self)
+               self._plib_registry = PreservedLibsRegistry(settings["ROOT"],
+                       os.path.join(self._eroot, PRIVATE_PATH, "preserved_libs_registry"))
+               self._linkmap = LinkageMap(self)
++              chost = self.settings.get('CHOST')
++              if not chost:
++                      chost = 'lunix?' # this happens when profiles are not available
++              if chost.find('darwin') >= 0:
++                      self._linkmap = LinkageMapMachO(self)
++              elif chost.find('interix') >= 0 or chost.find('winnt') >= 0:
++                      self._linkmap = LinkageMapPeCoff(self)
++              elif chost.find('aix') >= 0:
++                      self._linkmap = LinkageMapXCoff(self)
++              else:
++                      self._linkmap = LinkageMap(self)
                self._owners = self._owners_db(self)
  
                self._cached_counter = None
Simple merge
Simple merge
Simple merge
index 1486508da0272025ec6930af75c140239ecad750,4c1fbf8915f6ed9c677e28c2cce2397156deb0aa..6dc15a6f8cae9c06335b264ba9eeae5fd8038fbc
@@@ -86,9 -87,10 +87,10 @@@ def _env_update(makelinks, target_root
        else:
                settings = env
  
 -      eprefix = settings.get("EPREFIX", "")
 +      eprefix = settings.get("EPREFIX", portage.const.EPREFIX)
        eprefix_lstrip = eprefix.lstrip(os.sep)
-       envd_dir = os.path.join(target_root, eprefix_lstrip, "etc", "env.d")
+       eroot = normalize_path(os.path.join(target_root, eprefix_lstrip)).rstrip(os.sep) + os.sep
+       envd_dir = os.path.join(eroot, "etc", "env.d")
        ensure_dirs(envd_dir, mode=0o755)
        fns = listdir(envd_dir, EmptyOnError=1)
        fns.sort()
        penvnotice  = "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n"
        penvnotice += "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n"
        cenvnotice  = penvnotice[:]
 -      penvnotice += "# GO INTO /etc/profile NOT /etc/profile.env\n\n"
 -      cenvnotice += "# GO INTO /etc/csh.cshrc NOT /etc/csh.env\n\n"
 +      penvnotice += "# GO INTO " + eprefix + "/etc/profile NOT /etc/profile.env\n\n"
 +      cenvnotice += "# GO INTO " + eprefix + "/etc/csh.cshrc NOT /etc/csh.env\n\n"
  
        #create /etc/profile.env for bash support
-       outfile = atomic_ofstream(os.path.join(
-               target_root, eprefix_lstrip, "etc", "profile.env"))
+       outfile = atomic_ofstream(os.path.join(eroot, "etc", "profile.env"))
        outfile.write(penvnotice)
  
        env_keys = [ x for x in env if x != "LDPATH" ]
Simple merge