summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-26 20:20:02 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-26 20:20:02 +0000
commit4c25611c9dd21be7a81d32568e10159600659df6 (patch)
tree6651eb61e69331a814234f9ca59432696741fc83
parent7f254678851c439d085207fb6e7ddb7d5801de4a (diff)
downloadportage-4c25611c9dd21be7a81d32568e10159600659df6.tar.gz
portage-4c25611c9dd21be7a81d32568e10159600659df6.tar.bz2
portage-4c25611c9dd21be7a81d32568e10159600659df6.zip
Bug #205044 - When creating $EBUILD_EXIT_STATUS_FILE, don't direct output to /dev/null
since it should never fail and if it does then the error message might be useful. svn path=/main/trunk/; revision=12105
-rwxr-xr-xbin/ebuild.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index f01fdb16c..72f1f5acf 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -275,9 +275,13 @@ register_die_hook() {
# Ensure that $PWD is sane whenever possible, to protect against
# exploitation of insecure search path for python -c in ebuilds.
# See bug #239560.
-if ! hasq "$EBUILD_PHASE" clean depend help ; then
+if ! hasq "$EBUILD_PHASE" clean cleanrm depend help ; then
cd "$PORTAGE_BUILDDIR" || \
die "PORTAGE_BUILDDIR does not exist: '$PORTAGE_BUILDDIR'"
+else
+ # Don't try to create this when it's parent
+ # directory doesn't necessarily exist.
+ unset EBUILD_EXIT_STATUS_FILE
fi
#if no perms are specified, dirs/files will have decent defaults
@@ -2072,8 +2076,10 @@ ebuild_main() {
exit 1
;;
esac
- [ -n "${EBUILD_EXIT_STATUS_FILE}" ] && \
- touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null
+ if [ -n "$EBUILD_EXIT_STATUS_FILE" ] ; then
+ > "$EBUILD_EXIT_STATUS_FILE" || \
+ die "failed to create '$EBUILD_EXIT_STATUS_FILE'"
+ fi
}
[[ -n $EBUILD_SH_ARGS ]] && ebuild_main