rmdir .../var/tmp/binpkgs/cat/pkg-ver: Invalid argument
and alike for var/tmp/portage/... on Solaris.
rmtree(2) returns EINVAL on Solaris if the argument (the dir to remove)
is the current directory, or the argument ends with '.'. Since we cd to
PORTAGE_BUILDDIR we indeed cannot remove it anymore on Solaris. Hence,
we now try to go to the parent of this dir, but ultimately a better
solution should be found.
svn path=/main/branches/prefix/; revision=11577
}
# Ensure that $PWD is sane whenever possible.
-cd "$PORTAGE_BUILDDIR" 2>/dev/null
+cd "${PORTAGE_BUILDDIR}"/.. 2>/dev/null
#if no perms are specified, dirs/files will have decent defaults
#(not secretive, but not stupid)