1 |
Author: zmedico |
2 |
Date: 2008-10-05 16:31:26 +0000 (Sun, 05 Oct 2008) |
3 |
New Revision: 11630 |
4 |
|
5 |
Modified: |
6 |
main/trunk/bin/ebuild.sh |
7 |
Log: |
8 |
In dyn_clean, cd to $PORTAGE_BUILDDIR/.. before attempting to remove it since |
9 |
some kernels, such as Solaris, return EINVAL when an attempt is made to remove |
10 |
the current working directory. Thanks to Fabian Groffen <grobian@g.o> for |
11 |
reporting. |
12 |
|
13 |
|
14 |
Modified: main/trunk/bin/ebuild.sh |
15 |
=================================================================== |
16 |
--- main/trunk/bin/ebuild.sh 2008-10-05 16:04:31 UTC (rev 11629) |
17 |
+++ main/trunk/bin/ebuild.sh 2008-10-05 16:31:26 UTC (rev 11630) |
18 |
@@ -751,9 +751,10 @@ |
19 |
# result in it wiping the users distfiles directory (bad). |
20 |
rm -rf "${PORTAGE_BUILDDIR}/distdir" |
21 |
|
22 |
- if [ -z "$(find "${PORTAGE_BUILDDIR}" -mindepth 1 -maxdepth 1)" ]; then |
23 |
- rmdir "${PORTAGE_BUILDDIR}" |
24 |
- fi |
25 |
+ # Some kernels, such as Solaris, return EINVAL when an attempt |
26 |
+ # is made to remove the current working directory. |
27 |
+ cd "$PORTAGE_BUILDDIR"/.. |
28 |
+ rmdir "$PORTAGE_BUILDDIR" 2>/dev/null |
29 |
|
30 |
true |
31 |
} |