summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-09-21 15:50:08 +0000
committerZac Medico <zmedico@gentoo.org>2008-09-21 15:50:08 +0000
commit9ffef1292f6bd2842e543c1e6162b2dd57cb3535 (patch)
tree256b6180aeeadcf1b13b63d6d1a267380ba48bc3
parent9b11c72631162d11a5ec7e1cbe1d0fc3bd37ad28 (diff)
downloadportage-9ffef1292f6bd2842e543c1e6162b2dd57cb3535.tar.gz
portage-9ffef1292f6bd2842e543c1e6162b2dd57cb3535.tar.bz2
portage-9ffef1292f6bd2842e543c1e6162b2dd57cb3535.zip
Always call `cd "$WORKDIR"` to ensure that $CWD is sane whenever possible.
svn path=/main/trunk/; revision=11530
-rwxr-xr-xbin/ebuild.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 2d87d404a..e0b63d9f1 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -272,6 +272,9 @@ register_die_hook() {
export EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} $*"
}
+# Ensure that $CWD is sane whenever possible.
+cd "$WORKDIR" 2>/dev/null
+
#if no perms are specified, dirs/files will have decent defaults
#(not secretive, but not stupid)
umask 022