1 |
Author: zmedico |
2 |
Date: 2008-11-26 20:20:02 +0000 (Wed, 26 Nov 2008) |
3 |
New Revision: 12105 |
4 |
|
5 |
Modified: |
6 |
main/trunk/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 |
|
11 |
|
12 |
Modified: main/trunk/bin/ebuild.sh |
13 |
=================================================================== |
14 |
--- main/trunk/bin/ebuild.sh 2008-11-26 19:13:23 UTC (rev 12104) |
15 |
+++ main/trunk/bin/ebuild.sh 2008-11-26 20:20:02 UTC (rev 12105) |
16 |
@@ -275,9 +275,13 @@ |
17 |
# Ensure that $PWD is sane whenever possible, to protect against |
18 |
# exploitation of insecure search path for python -c in ebuilds. |
19 |
# See bug #239560. |
20 |
-if ! hasq "$EBUILD_PHASE" clean depend help ; then |
21 |
+if ! hasq "$EBUILD_PHASE" clean cleanrm depend help ; then |
22 |
cd "$PORTAGE_BUILDDIR" || \ |
23 |
die "PORTAGE_BUILDDIR does not exist: '$PORTAGE_BUILDDIR'" |
24 |
+else |
25 |
+ # Don't try to create this when it's parent |
26 |
+ # directory doesn't necessarily exist. |
27 |
+ unset EBUILD_EXIT_STATUS_FILE |
28 |
fi |
29 |
|
30 |
#if no perms are specified, dirs/files will have decent defaults |
31 |
@@ -2072,8 +2076,10 @@ |
32 |
exit 1 |
33 |
;; |
34 |
esac |
35 |
- [ -n "${EBUILD_EXIT_STATUS_FILE}" ] && \ |
36 |
- touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null |
37 |
+ if [ -n "$EBUILD_EXIT_STATUS_FILE" ] ; then |
38 |
+ > "$EBUILD_EXIT_STATUS_FILE" || \ |
39 |
+ die "failed to create '$EBUILD_EXIT_STATUS_FILE'" |
40 |
+ fi |
41 |
} |
42 |
|
43 |
[[ -n $EBUILD_SH_ARGS ]] && ebuild_main |