aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/write_binary_ebuild.bash11
-rwxr-xr-xpaludis/repositories/e/ebuild/write_vdb_entry.bash11
3 files changed, 15 insertions, 9 deletions
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index 6a893bc05..9683844e1 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -52,7 +52,7 @@ ebuild_sanitise_envvars()
# Force a few more things into PATH, since some users have crazy setups.
# See ticket:374.
- export PATH="/bin:/sbin:/usr/bin:/usr/sbin${PATH:+:${PATH}}"
+ export PATH="/usr/bin:/usr/sbin:/bin:/sbin${PATH:+:${PATH}}"
# Automake likes to scatter our utilities over two directories.
if [[ -n "${PALUDIS_EBUILD_DIR_FALLBACK}" ]] ; then
diff --git a/paludis/repositories/e/ebuild/write_binary_ebuild.bash b/paludis/repositories/e/ebuild/write_binary_ebuild.bash
index 3188ee759..5b20543e1 100755
--- a/paludis/repositories/e/ebuild/write_binary_ebuild.bash
+++ b/paludis/repositories/e/ebuild/write_binary_ebuild.bash
@@ -24,6 +24,13 @@ eval unset LANG ${!LC_*}
shopt -s expand_aliases
shopt -s extglob
+# Force a few more things into PATH, since some users have crazy setups.
+# See ticket:374.
+# NOTE(compnerd) this must be done first to ensure that the fallback directory
+# and utils directory take precedence over the path as some of our utilities
+# overload standard commands.
+export PATH="/usr/bin:/usr/sbin:/bin:/sbin${PATH:+:${PATH}}"
+
if [[ -n "${PALUDIS_EBUILD_DIR_FALLBACK}" ]] ; then
export PATH="${PALUDIS_EBUILD_DIR_FALLBACK}/utils:${PATH}"
fi
@@ -32,10 +39,6 @@ for p in ${PALUDIS_UTILITY_PATH_SUFFIXES} ; do
export PATH="${PALUDIS_EBUILD_DIR}/utils/${p}:${PATH}"
done
-# Force a few more things into PATH, since some users have crazy setups.
-# See ticket:374.
-export PATH="${PATH}:/bin:/sbin:/usr/bin:/usr/sbin"
-
EBUILD_MODULES_DIR=$(canonicalise $(dirname $0 ) )
if ! [[ -d ${EBUILD_MODULES_DIR} ]] ; then
echo "${EBUILD_MODULES_DIR} is not a directory" 1>&2
diff --git a/paludis/repositories/e/ebuild/write_vdb_entry.bash b/paludis/repositories/e/ebuild/write_vdb_entry.bash
index 5e780715b..0e0abc87b 100755
--- a/paludis/repositories/e/ebuild/write_vdb_entry.bash
+++ b/paludis/repositories/e/ebuild/write_vdb_entry.bash
@@ -24,6 +24,13 @@ eval unset LANG ${!LC_*}
shopt -s expand_aliases
shopt -s extglob
+# Force a few more things into PATH, since some users have crazy setups.
+# See ticket:374.
+# NOTE(compnerd) this must be done first to ensure that the fallback directory
+# and utils directory take precedence over the path as some of our utilities
+# overload standard commands.
+export PATH="/usr/bin:/usr/sbin:/bin:/sbin${PATH:+:${PATH}}"
+
if [[ -n "${PALUDIS_EBUILD_DIR_FALLBACK}" ]] ; then
export PATH="${PALUDIS_EBUILD_DIR_FALLBACK}/utils:${PATH}"
fi
@@ -32,10 +39,6 @@ for p in ${PALUDIS_UTILITY_PATH_SUFFIXES} ; do
export PATH="${PALUDIS_EBUILD_DIR}/utils/${p}:${PATH}"
done
-# Force a few more things into PATH, since some users have crazy setups.
-# See ticket:374.
-export PATH="${PATH}:/bin:/sbin:/usr/bin:/usr/sbin"
-
EBUILD_MODULES_DIR=$(canonicalise $(dirname $0 ) )
if ! [[ -d ${EBUILD_MODULES_DIR} ]] ; then
echo "${EBUILD_MODULES_DIR} is not a directory" 1>&2