aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-06-01 02:31:26 -0400
committerMike Frysinger <vapier@gentoo.org>2015-06-10 19:57:16 -0400
commit62769c609dd770a5f225028f6701af06a0dd8e9c (patch)
tree9b8b3775641ed8194aa700084a239b61d1f9289c /bin
parent_LazyImportFrom._get_target: handle submodule import (bug 550906) (diff)
downloadportage-62769c609dd770a5f225028f6701af06a0dd8e9c.tar.gz
portage-62769c609dd770a5f225028f6701af06a0dd8e9c.tar.bz2
portage-62769c609dd770a5f225028f6701af06a0dd8e9c.zip
require PORTAGE_{BIN,PYM}_PATH not be cleared
Rather than hardcode a full path everywhere as a fallback, assume the value is always set to the right location. The current path isn't the right place anymore already. If it turns out we want to support this scenario, we can do it via a bunch of bootstrapping (and symlinked) files.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild-helpers/die2
-rwxr-xr-xbin/ebuild-helpers/dobin2
-rwxr-xr-xbin/ebuild-helpers/doconfd2
-rwxr-xr-xbin/ebuild-helpers/dodir2
-rwxr-xr-xbin/ebuild-helpers/dodoc2
-rwxr-xr-xbin/ebuild-helpers/doenvd2
-rwxr-xr-xbin/ebuild-helpers/doexe2
-rwxr-xr-xbin/ebuild-helpers/dohard2
-rwxr-xr-xbin/ebuild-helpers/doheader2
-rwxr-xr-xbin/ebuild-helpers/dohtml6
-rwxr-xr-xbin/ebuild-helpers/doinfo2
-rwxr-xr-xbin/ebuild-helpers/doinitd2
-rwxr-xr-xbin/ebuild-helpers/doins2
-rwxr-xr-xbin/ebuild-helpers/dolib2
-rwxr-xr-xbin/ebuild-helpers/doman2
-rwxr-xr-xbin/ebuild-helpers/domo2
-rwxr-xr-xbin/ebuild-helpers/dosbin2
-rwxr-xr-xbin/ebuild-helpers/dosed2
-rwxr-xr-xbin/ebuild-helpers/dosym2
-rwxr-xr-xbin/ebuild-helpers/ecompress2
-rwxr-xr-xbin/ebuild-helpers/ecompressdir2
-rwxr-xr-xbin/ebuild-helpers/elog2
-rwxr-xr-xbin/ebuild-helpers/emake2
-rwxr-xr-xbin/ebuild-helpers/fowners2
-rwxr-xr-xbin/ebuild-helpers/fperms2
-rwxr-xr-xbin/ebuild-helpers/keepdir2
-rwxr-xr-xbin/ebuild-helpers/newins2
-rwxr-xr-xbin/ebuild-helpers/portageq4
-rwxr-xr-xbin/ebuild-helpers/prepall2
-rwxr-xr-xbin/ebuild-helpers/prepalldocs2
-rwxr-xr-xbin/ebuild-helpers/prepallinfo2
-rwxr-xr-xbin/ebuild-helpers/prepallman2
-rwxr-xr-xbin/ebuild-helpers/prepallstrip2
-rwxr-xr-xbin/ebuild-helpers/prepinfo2
-rwxr-xr-xbin/ebuild-helpers/prepman2
-rwxr-xr-xbin/ebuild-helpers/prepstrip3
-rwxr-xr-xbin/ebuild-helpers/unprivileged/chown4
-rwxr-xr-xbin/ebuild-helpers/xattr/install2
-rwxr-xr-xbin/ebuild-ipc4
-rwxr-xr-xbin/ebuild.sh3
-rw-r--r--bin/helper-functions.sh2
-rw-r--r--bin/isolated-functions.sh2
-rwxr-xr-xbin/misc-functions.sh2
43 files changed, 43 insertions, 55 deletions
diff --git a/bin/ebuild-helpers/die b/bin/ebuild-helpers/die
index 9869141dd..5c6b1d2cb 100755
--- a/bin/ebuild-helpers/die
+++ b/bin/ebuild-helpers/die
@@ -2,6 +2,6 @@
# Copyright 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}"/isolated-functions.sh || exit 1
die "$@"
exit 1
diff --git a/bin/ebuild-helpers/dobin b/bin/ebuild-helpers/dobin
index 0ba1eb0c4..9f4d73dc4 100755
--- a/bin/ebuild-helpers/dobin
+++ b/bin/ebuild-helpers/dobin
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if [[ $# -lt 1 ]] ; then
__helpers_die "${0##*/}: at least one argument needed"
diff --git a/bin/ebuild-helpers/doconfd b/bin/ebuild-helpers/doconfd
index 1baa3ed46..926c31839 100755
--- a/bin/ebuild-helpers/doconfd
+++ b/bin/ebuild-helpers/doconfd
@@ -3,7 +3,7 @@
# 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}"/isolated-functions.sh || exit 1
__helpers_die "${0##*/}: at least one argument needed"
exit 1
fi
diff --git a/bin/ebuild-helpers/dodir b/bin/ebuild-helpers/dodir
index e03ba9a58..eed2c8b8f 100755
--- a/bin/ebuild-helpers/dodir
+++ b/bin/ebuild-helpers/dodir
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ! ___eapi_has_prefix_variables; then
ED=${D}
diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc
index 6ccf0a406..75029eb20 100755
--- a/bin/ebuild-helpers/dodoc
+++ b/bin/ebuild-helpers/dodoc
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ___eapi_dodoc_supports_-r; then
__PORTAGE_HELPER='dodoc' exec doins "$@"
diff --git a/bin/ebuild-helpers/doenvd b/bin/ebuild-helpers/doenvd
index 67bb934f2..eb31f375b 100755
--- a/bin/ebuild-helpers/doenvd
+++ b/bin/ebuild-helpers/doenvd
@@ -3,7 +3,7 @@
# 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}"/isolated-functions.sh || exit 1
__helpers_die "${0##*/}: at least one argument needed"
exit 1
fi
diff --git a/bin/ebuild-helpers/doexe b/bin/ebuild-helpers/doexe
index c34fcae74..8c4b9e97c 100755
--- a/bin/ebuild-helpers/doexe
+++ b/bin/ebuild-helpers/doexe
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if [[ $# -lt 1 ]] ; then
__helpers_die "${0##*/}: at least one argument needed"
diff --git a/bin/ebuild-helpers/dohard b/bin/ebuild-helpers/dohard
index e0a44faf1..8a93fad4f 100755
--- a/bin/ebuild-helpers/dohard
+++ b/bin/ebuild-helpers/dohard
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ! ___eapi_has_dohard; then
die "'${0##*/}' has been banned for EAPI '$EAPI'"
diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader
index e4cae6a94..b827086ec 100755
--- a/bin/ebuild-helpers/doheader
+++ b/bin/ebuild-helpers/doheader
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ! ___eapi_has_doheader; then
die "${0##*/} is not supported in EAPI ${EAPI}"
diff --git a/bin/ebuild-helpers/dohtml b/bin/ebuild-helpers/dohtml
index 0478e49c3..860d4abbe 100755
--- a/bin/ebuild-helpers/dohtml
+++ b/bin/ebuild-helpers/dohtml
@@ -2,17 +2,15 @@
# Copyright 2009-2013 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}"/isolated-functions.sh || exit 1
if ___eapi_has_dohtml_deprecated; then
eqawarn "'${0##*/}' is deprecated in EAPI '$EAPI'"
fi
-PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}
-PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
# Use safe cwd, avoiding unsafe import for bug #469338.
export __PORTAGE_HELPER_CWD=${PWD}
-cd "${PORTAGE_PYM_PATH}"
+cd "${PORTAGE_PYM_PATH}" || die
PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
"${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
diff --git a/bin/ebuild-helpers/doinfo b/bin/ebuild-helpers/doinfo
index 2edbdc592..24b5ddd89 100755
--- a/bin/ebuild-helpers/doinfo
+++ b/bin/ebuild-helpers/doinfo
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if [[ -z $1 ]] ; then
__helpers_die "${0##*/}: at least one argument needed"
diff --git a/bin/ebuild-helpers/doinitd b/bin/ebuild-helpers/doinitd
index aa7b66c3c..a216d9827 100755
--- a/bin/ebuild-helpers/doinitd
+++ b/bin/ebuild-helpers/doinitd
@@ -3,7 +3,7 @@
# 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}"/isolated-functions.sh || exit 1
__helpers_die "${0##*/}: at least one argument needed"
exit 1
fi
diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index c60e05789..93052c2ea 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
helper=${__PORTAGE_HELPER:-${0##*/}}
diff --git a/bin/ebuild-helpers/dolib b/bin/ebuild-helpers/dolib
index fd92d7f03..a11bad463 100755
--- a/bin/ebuild-helpers/dolib
+++ b/bin/ebuild-helpers/dolib
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ! ___eapi_has_prefix_variables; then
ED=${D}
diff --git a/bin/ebuild-helpers/doman b/bin/ebuild-helpers/doman
index d6808597a..da66ac335 100755
--- a/bin/ebuild-helpers/doman
+++ b/bin/ebuild-helpers/doman
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if [[ $# -lt 1 ]] ; then
__helpers_die "${0##*/}: at least one argument needed"
diff --git a/bin/ebuild-helpers/domo b/bin/ebuild-helpers/domo
index 9a8dda38a..9742173ac 100755
--- a/bin/ebuild-helpers/domo
+++ b/bin/ebuild-helpers/domo
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
mynum=${#}
if [ ${mynum} -lt 1 ] ; then
diff --git a/bin/ebuild-helpers/dosbin b/bin/ebuild-helpers/dosbin
index 361ca83ca..2fee9d4e9 100755
--- a/bin/ebuild-helpers/dosbin
+++ b/bin/ebuild-helpers/dosbin
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if [[ $# -lt 1 ]] ; then
__helpers_die "${0##*/}: at least one argument needed"
diff --git a/bin/ebuild-helpers/dosed b/bin/ebuild-helpers/dosed
index 7db062963..1e10d129d 100755
--- a/bin/ebuild-helpers/dosed
+++ b/bin/ebuild-helpers/dosed
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ! ___eapi_has_dosed; then
die "'${0##*/}' has been banned for EAPI '$EAPI'"
diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index 649b100de..0bc8cc7be 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if [[ $# -ne 2 ]] ; then
__helpers_die "${0##*/}: two arguments needed"
diff --git a/bin/ebuild-helpers/ecompress b/bin/ebuild-helpers/ecompress
index 71287b4b0..50ee81129 100755
--- a/bin/ebuild-helpers/ecompress
+++ b/bin/ebuild-helpers/ecompress
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if [[ -z $1 ]] ; then
__helpers_die "${0##*/}: at least one argument needed"
diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index eca588869..4f57262e9 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -2,7 +2,7 @@
# Copyright 1999-2013 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}"/helper-functions.sh || exit 1
if [[ -z $1 ]] ; then
__helpers_die "${0##*/}: at least one argument needed"
diff --git a/bin/ebuild-helpers/elog b/bin/ebuild-helpers/elog
index a2303afab..911f8d57f 100755
--- a/bin/ebuild-helpers/elog
+++ b/bin/ebuild-helpers/elog
@@ -2,6 +2,6 @@
# 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}"/isolated-functions.sh || exit 1
${0##*/} "$@"
diff --git a/bin/ebuild-helpers/emake b/bin/ebuild-helpers/emake
index 2a3c2f09e..60718a2e4 100755
--- a/bin/ebuild-helpers/emake
+++ b/bin/ebuild-helpers/emake
@@ -9,7 +9,7 @@
#
# With newer EAPIs, we also automatically fail the build if make itself fails.
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
cmd=(
${MAKE:-make} ${MAKEOPTS} "$@" ${EXTRA_EMAKE}
diff --git a/bin/ebuild-helpers/fowners b/bin/ebuild-helpers/fowners
index cee4108ce..85f7fd614 100755
--- a/bin/ebuild-helpers/fowners
+++ b/bin/ebuild-helpers/fowners
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ! ___eapi_has_prefix_variables; then
EPREFIX= ED=${D}
diff --git a/bin/ebuild-helpers/fperms b/bin/ebuild-helpers/fperms
index d854ebbdf..297679cd0 100755
--- a/bin/ebuild-helpers/fperms
+++ b/bin/ebuild-helpers/fperms
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ! ___eapi_has_prefix_variables; then
ED=${D}
diff --git a/bin/ebuild-helpers/keepdir b/bin/ebuild-helpers/keepdir
index bec2feb77..e0c852d08 100755
--- a/bin/ebuild-helpers/keepdir
+++ b/bin/ebuild-helpers/keepdir
@@ -2,7 +2,7 @@
# Copyright 1999-2013 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}"/isolated-functions.sh || exit 1
if ! ___eapi_has_prefix_variables; then
ED=${D}
diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins
index 03359851a..8032a8f2f 100755
--- a/bin/ebuild-helpers/newins
+++ b/bin/ebuild-helpers/newins
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
helper=${0##*/}
diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq
index ba889ebcc..b314bce9f 100755
--- a/bin/ebuild-helpers/portageq
+++ b/bin/ebuild-helpers/portageq
@@ -5,10 +5,8 @@
scriptpath=${BASH_SOURCE[0]}
scriptname=${scriptpath##*/}
-PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}
-PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
# Use safe cwd, avoiding unsafe import for bug #469338.
-cd "${PORTAGE_PYM_PATH}"
+cd "${PORTAGE_PYM_PATH}" || exit 1
IFS=':'
set -f # in case ${PATH} contains any shell glob characters
diff --git a/bin/ebuild-helpers/prepall b/bin/ebuild-helpers/prepall
index fb5c2db55..44643bb58 100755
--- a/bin/ebuild-helpers/prepall
+++ b/bin/ebuild-helpers/prepall
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ! ___eapi_has_prefix_variables; then
ED=${D}
diff --git a/bin/ebuild-helpers/prepalldocs b/bin/ebuild-helpers/prepalldocs
index 3094661f5..cf63c64ed 100755
--- a/bin/ebuild-helpers/prepalldocs
+++ b/bin/ebuild-helpers/prepalldocs
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ___eapi_has_docompress; then
die "'${0##*/}' has been banned for EAPI '$EAPI'"
diff --git a/bin/ebuild-helpers/prepallinfo b/bin/ebuild-helpers/prepallinfo
index 1a2027580..cdf149e43 100755
--- a/bin/ebuild-helpers/prepallinfo
+++ b/bin/ebuild-helpers/prepallinfo
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ! ___eapi_has_prefix_variables; then
ED=${D}
diff --git a/bin/ebuild-helpers/prepallman b/bin/ebuild-helpers/prepallman
index 5331eaf01..03b10a8da 100755
--- a/bin/ebuild-helpers/prepallman
+++ b/bin/ebuild-helpers/prepallman
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
# replaced by controllable compression in EAPI 4
___eapi_has_docompress && exit 0
diff --git a/bin/ebuild-helpers/prepallstrip b/bin/ebuild-helpers/prepallstrip
index 1aa6686cd..59fa7cc61 100755
--- a/bin/ebuild-helpers/prepallstrip
+++ b/bin/ebuild-helpers/prepallstrip
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ! ___eapi_has_prefix_variables; then
ED=${D}
diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo
index 5afc18a71..a64d144a3 100755
--- a/bin/ebuild-helpers/prepinfo
+++ b/bin/ebuild-helpers/prepinfo
@@ -2,7 +2,7 @@
# 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}"/isolated-functions.sh || exit 1
if ! ___eapi_has_prefix_variables; then
ED=${D}
diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman
index fb5dcb4a5..e64acc0b0 100755
--- a/bin/ebuild-helpers/prepman
+++ b/bin/ebuild-helpers/prepman
@@ -5,7 +5,7 @@
# Do not compress man pages which are smaller than this (in bytes). #169260
SIZE_LIMIT='128'
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
if ! ___eapi_has_prefix_variables; then
ED=${D}
diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 2ef8a1ace..43caa29c7 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -2,8 +2,7 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/helper-functions.sh
+source "${PORTAGE_BIN_PATH}"/helper-functions.sh || exit 1
# avoid multiple calls to `has`. this creates things like:
# FEATURES_foo=false
diff --git a/bin/ebuild-helpers/unprivileged/chown b/bin/ebuild-helpers/unprivileged/chown
index 2f1f1617d..b57dc8aad 100755
--- a/bin/ebuild-helpers/unprivileged/chown
+++ b/bin/ebuild-helpers/unprivileged/chown
@@ -2,6 +2,8 @@
# Copyright 2012-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
+
scriptpath=${BASH_SOURCE[0]}
scriptname=${scriptpath##*/}
@@ -23,8 +25,6 @@ for path in ${PATH}; do
output="${output}\n ... (further messages truncated)"
fi
- source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
if ! ___eapi_has_prefix_variables; then
EPREFIX=
fi
diff --git a/bin/ebuild-helpers/xattr/install b/bin/ebuild-helpers/xattr/install
index 2d2a693a9..4d596e148 100755
--- a/bin/ebuild-helpers/xattr/install
+++ b/bin/ebuild-helpers/xattr/install
@@ -2,8 +2,6 @@
# Copyright 2013-2015 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}
INSTALL_XATTR=${EPREFIX}/usr/bin/install-xattr
# Use safe cwd, avoiding unsafe import for bug #469338.
export __PORTAGE_HELPER_CWD=${PWD}
diff --git a/bin/ebuild-ipc b/bin/ebuild-ipc
index 820005fbb..e77b94b2c 100755
--- a/bin/ebuild-ipc
+++ b/bin/ebuild-ipc
@@ -2,9 +2,7 @@
# Copyright 2010-2013 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}
# Use safe cwd, avoiding unsafe import for bug #469338.
-cd "${PORTAGE_PYM_PATH}"
+cd "${PORTAGE_PYM_PATH}" || exit 1
PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
exec "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/ebuild-ipc.py" "$@"
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 4e26f879e..75a9d2468 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -2,9 +2,6 @@
# Copyright 1999-2015 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}"
-
# Prevent aliases from causing portage to act inappropriately.
# Make sure it's before everything so we don't mess aliases that follow.
unalias -a
diff --git a/bin/helper-functions.sh b/bin/helper-functions.sh
index b9bc74a2e..c096aedb6 100644
--- a/bin/helper-functions.sh
+++ b/bin/helper-functions.sh
@@ -5,7 +5,7 @@
# For routines we want to use in ebuild-helpers/ but don't want to
# expose to the general ebuild environment.
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
#
# API functions for doing parallel processing
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 8e789ec1f..003c01d3e 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -2,7 +2,7 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}/eapi.sh"
+source "${PORTAGE_BIN_PATH}/eapi.sh" || exit 1
# We need this next line for "die" and "assert". It expands
# It _must_ preceed all the calls to die and assert.
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 24941af9b..9b79351b8 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -14,7 +14,7 @@
MISC_FUNCTIONS_ARGS="$@"
shift $#
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}/ebuild.sh"
+source "${PORTAGE_BIN_PATH}/ebuild.sh" || exit 1
install_symlink_html_docs() {
if ! ___eapi_has_prefix_variables; then