Commit 164c65f0 authored by Julien Muchembled's avatar Julien Muchembled

fixup! In __buildout_signature__, fix missing parts that are pulled by recipes' __init__

parent a853099d
......@@ -1282,23 +1282,22 @@ class Buildout(DictMixin):
def __getitem__(self, section):
__doing__ = 'Getting section %s.', section
if self._initializing:
caller = self._initializing[-1]
if 'buildout' != section != caller.name:
caller.depends.add(section)
try:
return self._data[section]
options = self._data[section]
except KeyError:
pass
try:
data = self._raw[section]
except KeyError:
raise MissingSection(section)
try:
data = self._raw[section]
except KeyError:
raise MissingSection(section)
options = self.Options(self, section, data)
self._data[section] = options
options._initialize()
options = self.Options(self, section, data)
self._data[section] = options
options._initialize()
if self._initializing:
caller = self._initializing[-1]
if 'buildout' != section != caller.name:
caller.depends.add(section)
return options
def __setitem__(self, name, data):
......@@ -1508,12 +1507,14 @@ class Options(DictMixin):
section, option = s
if not section:
section = self.name
elif section != 'buildout':
assert not self.buildout._initializing, (self.name,
self.buildout._initializing[-1],
len(self.buildout._initializing))
self.depends.add(section)
v = self.buildout[section].get(option, None, seen, last=last)
options = self
else:
self.buildout._initializing.append(self)
try:
options = self.buildout[section]
finally:
del self.buildout._initializing[-1]
v = options.get(option, None, seen, last=last)
if v is None:
if option == '_buildout_section_name_':
v = self.name
......
......@@ -2118,6 +2118,9 @@ def test_part_pulled_by_recipe():
... <= a
... a = A
... b = B
... c = ${c:x}
... [c]
... x = c
... ''')
>>> os.chdir(sample_buildout)
......@@ -2142,7 +2145,7 @@ def test_part_pulled_by_recipe():
...
[b]
__buildout_installed__ =
__buildout_signature__ = recipes-c79aac86a90182467ce2fdae8b56eb1c
__buildout_signature__ = recipes-c79aac86a90182467ce2fdae8b56eb1c c:...
...
[a]
__buildout_installed__ =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment