1 |
Author: zmedico |
2 |
Date: 2008-10-09 18:12:45 +0000 (Thu, 09 Oct 2008) |
3 |
New Revision: 11662 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.4/bin/ebuild.sh |
7 |
main/branches/2.1.4/pym/portage.py |
8 |
Log: |
9 |
Fixes for Bug #239560: |
10 |
* When ensuring sane $PWD in ebuild.sh, die if the `cd "$PORTAGE_BUILDDIR"` |
11 |
call fails. |
12 |
* Create $PORTAGE_BUILDDIR for the "fetch" phase too since it might be |
13 |
necessary to call pkg_nofetch. |
14 |
|
15 |
|
16 |
Modified: main/branches/2.1.4/bin/ebuild.sh |
17 |
=================================================================== |
18 |
--- main/branches/2.1.4/bin/ebuild.sh 2008-10-09 01:10:49 UTC (rev 11661) |
19 |
+++ main/branches/2.1.4/bin/ebuild.sh 2008-10-09 18:12:45 UTC (rev 11662) |
20 |
@@ -260,6 +260,12 @@ |
21 |
export EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} $*" |
22 |
} |
23 |
|
24 |
+# Ensure that $PWD is sane whenever possible. |
25 |
+if ! hasq "$EBUILD_PHASE" clean depend help ; then |
26 |
+ cd "$PORTAGE_BUILDDIR" || \ |
27 |
+ die "PORTAGE_BUILDDIR does not exist: '$PORTAGE_BUILDDIR'" |
28 |
+fi |
29 |
+ |
30 |
#if no perms are specified, dirs/files will have decent defaults |
31 |
#(not secretive, but not stupid) |
32 |
umask 022 |
33 |
|
34 |
Modified: main/branches/2.1.4/pym/portage.py |
35 |
=================================================================== |
36 |
--- main/branches/2.1.4/pym/portage.py 2008-10-09 01:10:49 UTC (rev 11661) |
37 |
+++ main/branches/2.1.4/pym/portage.py 2008-10-09 18:12:45 UTC (rev 11662) |
38 |
@@ -4475,8 +4475,7 @@ |
39 |
|
40 |
# Build directory creation isn't required for any of these. |
41 |
have_build_dirs = False |
42 |
- if mydo not in ("clean", "cleanrm", "digest", |
43 |
- "fetch", "help", "manifest"): |
44 |
+ if mydo not in ("clean", "cleanrm", "digest", "help", "manifest"): |
45 |
mystatus = prepare_build_dirs(myroot, mysettings, cleanup) |
46 |
if mystatus: |
47 |
return mystatus |