aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/write_vdb_entry.bash
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/ebuild/write_vdb_entry.bash')
-rwxr-xr-xpaludis/repositories/e/ebuild/write_vdb_entry.bash11
1 files changed, 7 insertions, 4 deletions
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