Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13155 - main/branches/2.1.6/pym/portage
Date: Mon, 23 Mar 2009 02:17:05
Message-Id: E1LlZip-0003pB-Ob@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-03-23 02:17:03 +0000 (Mon, 23 Mar 2009)
3 New Revision: 13155
4
5 Modified:
6 main/branches/2.1.6/pym/portage/__init__.py
7 Log:
8 Make sure mysettings.setcpv() always gets called when necessary inside
9 doebuild_environment(). (trunk r13136)
10
11 Modified: main/branches/2.1.6/pym/portage/__init__.py
12 ===================================================================
13 --- main/branches/2.1.6/pym/portage/__init__.py 2009-03-23 02:16:34 UTC (rev 13154)
14 +++ main/branches/2.1.6/pym/portage/__init__.py 2009-03-23 02:17:03 UTC (rev 13155)
15 @@ -5032,14 +5032,16 @@
16 # so that the caller can override it.
17 tmpdir = mysettings["PORTAGE_TMPDIR"]
18
19 - if mydo != "depend" and mycpv != mysettings.mycpv:
20 - """For performance reasons, setcpv only triggers reset when it
21 - detects a package-specific change in config. For the ebuild
22 - environment, a reset call is forced in order to ensure that the
23 - latest env.d variables are used."""
24 + if mycpv != mysettings.mycpv:
25 + # Reload env.d variables and reset any previous settings.
26 mysettings.reload()
27 - mysettings.reset(use_cache=use_cache)
28 - mysettings.setcpv(mycpv, use_cache=use_cache, mydb=mydbapi)
29 + mysettings.reset()
30 + if mydo == 'depend':
31 + # Don't pass in mydbapi here since the resulting aux_get
32 + # call would lead to infinite 'depend' phase recursion.
33 + mysettings.setcpv(mycpv)
34 + else:
35 + mysettings.setcpv(mycpv, mydb=mydbapi)
36
37 # config.reset() might have reverted a change made by the caller,
38 # so restore it to it's original value.