diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-10-05 05:09:33 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-10-05 05:09:33 +0000 |
commit | 177c09dcc037d568fe421de0b5d7ddc3c618f352 (patch) | |
tree | 9beb3570474de812f2a7bd2b7ab8d772a45e8e7a | |
parent | a9578ae9501b11b7e2161dbe2f72abdcf080f6b8 (diff) | |
download | portage-177c09dcc037d568fe421de0b5d7ddc3c618f352.tar.gz portage-177c09dcc037d568fe421de0b5d7ddc3c618f352.tar.bz2 portage-177c09dcc037d568fe421de0b5d7ddc3c618f352.zip |
* 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
-rwxr-xr-x | bin/ebuild.sh | 5 | ||||
-rw-r--r-- | pym/portage/__init__.py | 3 |
2 files changed, 5 insertions, 3 deletions
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) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 2a596fa86..2cf46461e 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5430,8 +5430,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, # Build directory creation isn't required for any of these. have_build_dirs = False - if mydo not in ("clean", "cleanrm", "digest", - "fetch", "help", "manifest"): + if mydo not in ("digest", "help", "manifest"): mystatus = prepare_build_dirs(myroot, mysettings, cleanup) if mystatus: return mystatus |