From bb307f69c90b11cc40d687e49aa4d17a8d206b95 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Fri, 7 Dec 2012 22:30:59 -0800 Subject: 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. --- paludis/repositories/e/ebuild/write_binary_ebuild.bash | 6 +++--- 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 ) ) -- cgit v1.2.3