Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r12106 - main/branches/2.1.6/bin
Date: Wed, 26 Nov 2008 20:21:31
Message-Id: E1L5Qt7-0006Fa-1w@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-11-26 20:21:28 +0000 (Wed, 26 Nov 2008)
3 New Revision: 12106
4
5 Modified:
6 main/branches/2.1.6/bin/ebuild.sh
7 Log:
8 Bug #205044 - When creating $EBUILD_EXIT_STATUS_FILE, don't direct output to /dev/null
9 since it should never fail and if it does then the error message might be useful.
10 (trunk r12105)
11
12
13 Modified: main/branches/2.1.6/bin/ebuild.sh
14 ===================================================================
15 --- main/branches/2.1.6/bin/ebuild.sh 2008-11-26 20:20:02 UTC (rev 12105)
16 +++ main/branches/2.1.6/bin/ebuild.sh 2008-11-26 20:21:28 UTC (rev 12106)
17 @@ -275,9 +275,13 @@
18 # Ensure that $PWD is sane whenever possible, to protect against
19 # exploitation of insecure search path for python -c in ebuilds.
20 # See bug #239560.
21 -if ! hasq "$EBUILD_PHASE" clean depend help ; then
22 +if ! hasq "$EBUILD_PHASE" clean cleanrm depend help ; then
23 cd "$PORTAGE_BUILDDIR" || \
24 die "PORTAGE_BUILDDIR does not exist: '$PORTAGE_BUILDDIR'"
25 +else
26 + # Don't try to create this when it's parent
27 + # directory doesn't necessarily exist.
28 + unset EBUILD_EXIT_STATUS_FILE
29 fi
30
31 #if no perms are specified, dirs/files will have decent defaults
32 @@ -2072,8 +2076,10 @@
33 exit 1
34 ;;
35 esac
36 - [ -n "${EBUILD_EXIT_STATUS_FILE}" ] && \
37 - touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null
38 + if [ -n "$EBUILD_EXIT_STATUS_FILE" ] ; then
39 + > "$EBUILD_EXIT_STATUS_FILE" || \
40 + die "failed to create '$EBUILD_EXIT_STATUS_FILE'"
41 + fi
42 }
43
44 [[ -n $EBUILD_SH_ARGS ]] && ebuild_main