From 177c09dcc037d568fe421de0b5d7ddc3c618f352 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 5 Oct 2008 05:09:33 +0000 Subject: * When ensuring sane $PWD in ebuild.sh, die if the `cd "$PORTAGE_BUILDDIR"` call fails. * Create $PORTAGE_BUILDDIR for the "fetch" phase too since it might be necessary to call pkg_nofetch. svn path=/main/trunk/; revision=11628 --- bin/ebuild.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 041d5fa4d..c274680f0 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -273,7 +273,10 @@ register_die_hook() { } # Ensure that $PWD is sane whenever possible. -cd "$PORTAGE_BUILDDIR" 2>/dev/null +if ! hasq "$EBUILD_PHASE" clean depend help ; then + cd "$PORTAGE_BUILDDIR" || \ + die "PORTAGE_BUILDDIR does not exist: '$PORTAGE_BUILDDIR'" +fi #if no perms are specified, dirs/files will have decent defaults #(not secretive, but not stupid) -- cgit v1.2.3-1-g7c22