diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-11 03:27:55 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-11 03:27:55 +0000 |
commit | 2bba3340e02503d84f1e9437b9c13b66ffb15659 (patch) | |
tree | ad0b9b2f6ddd03ccac2cd9335f677cf208599846 /pym | |
parent | 9dac64d8db6bc89acebeb2ff7e2d8a19f378d924 (diff) | |
download | portage-2bba3340e02503d84f1e9437b9c13b66ffb15659.tar.gz portage-2bba3340e02503d84f1e9437b9c13b66ffb15659.tar.bz2 portage-2bba3340e02503d84f1e9437b9c13b66ffb15659.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. (trunk r12558)
svn path=/main/branches/2.1.6/; revision=12844
Diffstat (limited to 'pym')
-rw-r--r-- | pym/_emerge/__init__.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 160e32901..785e16478 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -2321,12 +2321,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: |