summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-10-12 20:57:00 +0000
committerZac Medico <zmedico@gentoo.org>2008-10-12 20:57:00 +0000
commit312bb82bbc4170346159754b57fb464717bd88a7 (patch)
tree2edf3f8dcaa2ed1ef44644c0786e82dab7d451b7 /pym
parent54f7735452ce76683556dcee99905597808ad312 (diff)
downloadportage-312bb82bbc4170346159754b57fb464717bd88a7.tar.gz
portage-312bb82bbc4170346159754b57fb464717bd88a7.tar.bz2
portage-312bb82bbc4170346159754b57fb464717bd88a7.zip
Inside fetch(), don't call pkg_nofetch when in parallel-fetch mode since
it will get call again later anyway. svn path=/main/trunk/; revision=11683
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index dc21b10d5..c171c1ce9 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4068,16 +4068,21 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
"ebuild's files must be downloaded"
print "!!! manually. See the comments in" + \
" the ebuild for more information.\n"
- ebuild_phase = mysettings.get("EBUILD_PHASE")
- try:
- mysettings["EBUILD_PHASE"] = "nofetch"
- spawn(_shell_quote(EBUILD_SH_BINARY) + \
- " nofetch", mysettings)
- finally:
- if ebuild_phase is None:
- mysettings.pop("EBUILD_PHASE", None)
- else:
- mysettings["EBUILD_PHASE"] = ebuild_phase
+ if not parallel_fetchonly:
+ # To spawn pkg_nofetch requires PORTAGE_BUILDDIR for
+ # ensuring sane $PWD (bug #239560) and storing elog
+ # messages. Therefore, calling code needs to ensure that
+ # PORTAGE_BUILDDIR is already clean and locked here.
+ ebuild_phase = mysettings.get("EBUILD_PHASE")
+ try:
+ mysettings["EBUILD_PHASE"] = "nofetch"
+ spawn(_shell_quote(EBUILD_SH_BINARY) + \
+ " nofetch", mysettings)
+ finally:
+ if ebuild_phase is None:
+ mysettings.pop("EBUILD_PHASE", None)
+ else:
+ mysettings["EBUILD_PHASE"] = ebuild_phase
elif not filedict[myfile]:
writemsg("Warning: No mirrors available for file" + \
" '%s'\n" % (myfile), noiselevel=-1)