diff options
author | 2012-12-07 22:30:59 -0800 | |
---|---|---|
committer | 2012-12-09 17:34:50 +0000 | |
commit | bb307f69c90b11cc40d687e49aa4d17a8d206b95 (patch) | |
tree | 7a4005f39b4e290cc8bb26ed2a3f62632f322957 | |
parent | 81a487def0c8392e743df3778d99317e297a9b7d (diff) | |
download | paludis-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-x | paludis/repositories/e/ebuild/write_binary_ebuild.bash | 6 | ||||
-rwxr-xr-x | paludis/repositories/e/ebuild/write_vdb_entry.bash | 6 |
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 5b20543e1..a0e15fdea 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 0e0abc87b..4cb4b7dcb 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 ) ) |