Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13431 - in main/branches/2.1.6/pym: _emerge portage
Date: Thu, 30 Apr 2009 06:49:02
Message-Id: E1LzQ4q-0004Ko-Q2@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-04-30 06:48:59 +0000 (Thu, 30 Apr 2009)
3 New Revision: 13431
4
5 Modified:
6 main/branches/2.1.6/pym/_emerge/__init__.py
7 main/branches/2.1.6/pym/portage/__init__.py
8 Log:
9 Bug #264291 - Fix inappropriate build dir creation for emerge --fetchonly.
10 (trunk r13252)
11
12 Modified: main/branches/2.1.6/pym/_emerge/__init__.py
13 ===================================================================
14 --- main/branches/2.1.6/pym/_emerge/__init__.py 2009-04-30 06:48:48 UTC (rev 13430)
15 +++ main/branches/2.1.6/pym/_emerge/__init__.py 2009-04-30 06:48:59 UTC (rev 13431)
16 @@ -1769,8 +1769,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/branches/2.1.6/pym/portage/__init__.py
27 ===================================================================
28 --- main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 06:48:48 UTC (rev 13430)
29 +++ main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 06:48:59 UTC (rev 13431)
30 @@ -5831,6 +5831,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 @@ -5939,8 +5940,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