summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-01-28 18:39:48 +0000
committerZac Medico <zmedico@gentoo.org>2009-01-28 18:39:48 +0000
commit6e54445aadafe9125a24fb415da874febeb2fdb8 (patch)
tree2faa9323c7622eb50991f59985eba244008e6cbb
parent43e23f470a35215a96c646d107e3a6dc31d16216 (diff)
downloadportage-6e54445aadafe9125a24fb415da874febeb2fdb8.tar.gz
portage-6e54445aadafe9125a24fb415da874febeb2fdb8.tar.bz2
portage-6e54445aadafe9125a24fb415da874febeb2fdb8.zip
In EbuildFetcher._start(), don't touch the build dir when in prefetch mode.
In this case, logging goes to emerge-fetch.log and the builddir should not be touched since otherwise it could interfere with another instance of the same cpv concurrently being built for a different $ROOT (currently, builds only cooperate with prefetchers that are spawned for the same $ROOT). Thanks to Daniel Robbins for reporting this issue. svn path=/main/trunk/; revision=12558
-rw-r--r--pym/_emerge/__init__.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 881ba9cc6..5666acaa3 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -2340,12 +2340,20 @@ class EbuildFetcher(SpawnProcess):
portdb = root_config.trees["porttree"].dbapi
ebuild_path = portdb.findname(self.pkg.cpv)
settings = self.config_pool.allocate()
- self._build_dir = EbuildBuildDir(pkg=self.pkg, settings=settings)
- self._build_dir.lock()
- self._build_dir.clean()
- portage.prepare_build_dirs(self.pkg.root, self._build_dir.settings, 0)
- if self.logfile is None:
- self.logfile = settings.get("PORTAGE_LOG_FILE")
+ settings.setcpv(self.pkg)
+
+ # In prefetch mode, logging goes to emerge-fetch.log and the builddir
+ # should not be touched since otherwise it could interfere with
+ # another instance of the same cpv concurrently being built for a
+ # different $ROOT (currently, builds only cooperate with prefetchers
+ # that are spawned for the same $ROOT).
+ if not self.prefetch:
+ self._build_dir = EbuildBuildDir(pkg=self.pkg, settings=settings)
+ self._build_dir.lock()
+ self._build_dir.clean()
+ portage.prepare_build_dirs(self.pkg.root, self._build_dir.settings, 0)
+ if self.logfile is None:
+ self.logfile = settings.get("PORTAGE_LOG_FILE")
phase = "fetch"
if self.fetchall: