summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-24 23:31:57 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-24 23:31:57 -0700
commit0452d2293d46141d0746f845f7dcfacdab03302a (patch)
treeae6affee443951c05711104153b10832c7eca85d
parent398cc46ca2893689997eae5940d13e87284f8237 (diff)
downloadportage-0452d2293d46141d0746f845f7dcfacdab03302a.tar.gz
portage-0452d2293d46141d0746f845f7dcfacdab03302a.tar.bz2
portage-0452d2293d46141d0746f845f7dcfacdab03302a.zip
When parsing package.env, pass the same tolerant and allow_sourcing
arguments to getconfig() that are used when parsing make.conf.
-rw-r--r--pym/portage/package/ebuild/config.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 8bea4af98..1ae95b0fe 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -356,6 +356,7 @@ class config(object):
# from 'import portage' or 'import portage.exceptions' statements
# can practically render the api unusable for api consumers.
tolerant = hasattr(portage, '_initializing_globals')
+ self._tolerant = tolerant
self.already_in_regenerate = 0
@@ -393,6 +394,7 @@ class config(object):
if clone:
# For immutable attributes, use shallow copy for
# speed and memory conservation.
+ self._tolerant = clone._tolerant
self.categories = clone.categories
self.depcachedir = clone.depcachedir
self.incrementals = clone.incrementals
@@ -1718,7 +1720,8 @@ class config(object):
incrementals = self.incrementals
for envname in penv:
penvfile = os.path.join(abs_user_config, "env", envname)
- penvconfig = getconfig(penvfile, expand=expand_map)
+ penvconfig = getconfig(penvfile, tolerant=self._tolerant,
+ allow_sourcing=True, expand=expand_map)
if penvconfig is None:
writemsg("!!! %s references non-existent file: %s\n" % \
(os.path.join(abs_user_config, 'package.env'), penvfile),