Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13252 - in main/trunk/pym: _emerge portage
Date: Mon, 30 Mar 2009 19:46:45
Message-Id: E1LoNRS-0003r9-Pz@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-03-30 19:46:41 +0000 (Mon, 30 Mar 2009)
3 New Revision: 13252
4
5 Modified:
6 main/trunk/pym/_emerge/__init__.py
7 main/trunk/pym/portage/__init__.py
8 Log:
9 Bug #264291 - Fix inappropriate build dir creation for emerge --fetchonly.
10
11
12 Modified: main/trunk/pym/_emerge/__init__.py
13 ===================================================================
14 --- main/trunk/pym/_emerge/__init__.py 2009-03-30 06:44:20 UTC (rev 13251)
15 +++ main/trunk/pym/_emerge/__init__.py 2009-03-30 19:46:41 UTC (rev 13252)
16 @@ -1788,8 +1788,6 @@
17 portdb = root_config.trees["porttree"].dbapi
18 ebuild_path = portdb.findname(pkg.cpv)
19 debug = settings.get("PORTAGE_DEBUG") == "1"
20 - portage.prepare_build_dirs(self.pkg.root, self.settings, 0)
21 -
22 retval = portage.doebuild(ebuild_path, "fetch",
23 self.settings["ROOT"], self.settings, debug=debug,
24 listonly=self.pretend, fetchonly=1, fetchall=self.fetch_all,
25
26 Modified: main/trunk/pym/portage/__init__.py
27 ===================================================================
28 --- main/trunk/pym/portage/__init__.py 2009-03-30 06:44:20 UTC (rev 13251)
29 +++ main/trunk/pym/portage/__init__.py 2009-03-30 19:46:41 UTC (rev 13252)
30 @@ -5841,6 +5841,7 @@
31 logfile=None, returnpid=returnpid)
32 return retval
33
34 + restrict = set(mysettings.get('PORTAGE_RESTRICT', '').split())
35 # get possible slot information from the deps file
36 if mydo == "depend":
37 writemsg("!!! DEBUG: dbkey: %s\n" % str(dbkey), 2)
38 @@ -5949,8 +5950,13 @@
39 mysettings["PF"], myroot, mysettings, vartree=vartree)
40
41 # Build directory creation isn't required for any of these.
42 + # In the fetch phase, the directory is needed only for RESTRICT=fetch
43 + # in order to satisfy the sane $PWD requirement (from bug #239560)
44 + # when pkg_nofetch is spawned.
45 have_build_dirs = False
46 - if not parallel_fetchonly and mydo not in ("digest", "help", "manifest"):
47 + if not parallel_fetchonly and \
48 + mydo not in ('digest', 'help', 'manifest') and \
49 + not (mydo == 'fetch' and 'fetch' not in restrict):
50 mystatus = prepare_build_dirs(myroot, mysettings, cleanup)
51 if mystatus:
52 return mystatus