At the end of dyn_clean(), also remove the $CATEGORY directory if possible.
svn path=/main/trunk/; revision=11667
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index b501e94..92b635c 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -753,8 +753,8 @@
# Some kernels, such as Solaris, return EINVAL when an attempt
# is made to remove the current working directory.
- cd "$PORTAGE_BUILDDIR"/..
- rmdir "$PORTAGE_BUILDDIR" 2>/dev/null
+ cd "$PORTAGE_BUILDDIR"/../..
+ rmdir "$PORTAGE_BUILDDIR" "${PORTAGE_BUILDDIR%/*}" 2>/dev/null
true
}