aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2012-12-07 22:30:59 -0800
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-12-09 17:34:50 +0000
commitbb307f69c90b11cc40d687e49aa4d17a8d206b95 (patch)
tree7a4005f39b4e290cc8bb26ed2a3f62632f322957
parent81a487def0c8392e743df3778d99317e297a9b7d (diff)
downloadpaludis-bb307f69c90b11cc40d687e49aa4d17a8d206b95.tar.gz
paludis-bb307f69c90b11cc40d687e49aa4d17a8d206b95.tar.xz
ebuild: be more cautious when modifying the path
Be more cautious when prepending to the path to avoid an empty component in the caes that the PATH is empty.
-rwxr-xr-xpaludis/repositories/e/ebuild/write_binary_ebuild.bash6
-rwxr-xr-xpaludis/repositories/e/ebuild/write_vdb_entry.bash6
2 files changed, 6 insertions, 6 deletions
diff --git a/paludis/repositories/e/ebuild/write_binary_ebuild.bash b/paludis/repositories/e/ebuild/write_binary_ebuild.bash
index 5b20543..a0e15fd 100755
--- a/paludis/repositories/e/ebuild/write_binary_ebuild.bash
+++ b/paludis/repositories/e/ebuild/write_binary_ebuild.bash
@@ -32,11 +32,11 @@ shopt -s extglob
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}"
+ export PATH="${PALUDIS_EBUILD_DIR_FALLBACK}/utils${PATH:+:${PATH}}"
fi
-export PATH="${PALUDIS_EBUILD_DIR}/utils:${PATH}"
+export PATH="${PALUDIS_EBUILD_DIR}/utils${PATH:+:${PATH}}"
for p in ${PALUDIS_UTILITY_PATH_SUFFIXES} ; do
- export PATH="${PALUDIS_EBUILD_DIR}/utils/${p}:${PATH}"
+ export PATH="${PALUDIS_EBUILD_DIR}/utils/${p}${PATH:+:${PATH}}"
done
EBUILD_MODULES_DIR=$(canonicalise $(dirname $0 ) )
diff --git a/paludis/repositories/e/ebuild/write_vdb_entry.bash b/paludis/repositories/e/ebuild/write_vdb_entry.bash
index 0e0abc8..4cb4b7d 100755
--- a/paludis/repositories/e/ebuild/write_vdb_entry.bash
+++ b/paludis/repositories/e/ebuild/write_vdb_entry.bash
@@ -32,11 +32,11 @@ shopt -s extglob
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}"
+ export PATH="${PALUDIS_EBUILD_DIR_FALLBACK}/utils${PATH:+:${PATH}}"
fi
-export PATH="${PALUDIS_EBUILD_DIR}/utils:${PATH}"
+export PATH="${PALUDIS_EBUILD_DIR}/utils${PATH:+:${PATH}}"
for p in ${PALUDIS_UTILITY_PATH_SUFFIXES} ; do
- export PATH="${PALUDIS_EBUILD_DIR}/utils/${p}:${PATH}"
+ export PATH="${PALUDIS_EBUILD_DIR}/utils/${p}${PATH:+:${PATH}}"
done
EBUILD_MODULES_DIR=$(canonicalise $(dirname $0 ) )