Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r12558 - main/trunk/pym/_emerge
Date: Wed, 28 Jan 2009 18:39:52
Message-Id: E1LSFKH-0004OG-Oq@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-01-28 18:39:48 +0000 (Wed, 28 Jan 2009)
3 New Revision: 12558
4
5 Modified:
6 main/trunk/pym/_emerge/__init__.py
7 Log:
8 In EbuildFetcher._start(), don't touch the build dir when in prefetch mode.
9 In this case, logging goes to emerge-fetch.log and the builddir should not be
10 touched since otherwise it could interfere with another instance of the same
11 cpv concurrently being built for a different $ROOT (currently, builds only
12 cooperate with prefetchers that are spawned for the same $ROOT). Thanks to
13 Daniel Robbins for reporting this issue.
14
15
16 Modified: main/trunk/pym/_emerge/__init__.py
17 ===================================================================
18 --- main/trunk/pym/_emerge/__init__.py 2009-01-28 08:47:38 UTC (rev 12557)
19 +++ main/trunk/pym/_emerge/__init__.py 2009-01-28 18:39:48 UTC (rev 12558)
20 @@ -2340,13 +2340,21 @@
21 portdb = root_config.trees["porttree"].dbapi
22 ebuild_path = portdb.findname(self.pkg.cpv)
23 settings = self.config_pool.allocate()
24 - self._build_dir = EbuildBuildDir(pkg=self.pkg, settings=settings)
25 - self._build_dir.lock()
26 - self._build_dir.clean()
27 - portage.prepare_build_dirs(self.pkg.root, self._build_dir.settings, 0)
28 - if self.logfile is None:
29 - self.logfile = settings.get("PORTAGE_LOG_FILE")
30 + settings.setcpv(self.pkg)
31
32 + # In prefetch mode, logging goes to emerge-fetch.log and the builddir
33 + # should not be touched since otherwise it could interfere with
34 + # another instance of the same cpv concurrently being built for a
35 + # different $ROOT (currently, builds only cooperate with prefetchers
36 + # that are spawned for the same $ROOT).
37 + if not self.prefetch:
38 + self._build_dir = EbuildBuildDir(pkg=self.pkg, settings=settings)
39 + self._build_dir.lock()
40 + self._build_dir.clean()
41 + portage.prepare_build_dirs(self.pkg.root, self._build_dir.settings, 0)
42 + if self.logfile is None:
43 + self.logfile = settings.get("PORTAGE_LOG_FILE")
44 +
45 phase = "fetch"
46 if self.fetchall:
47 phase = "fetchall"