Commit f60c396b authored by Jérome Perrin's avatar Jérome Perrin Committed by Julien Muchembled

Use lower level API to calculate signature

If we use options.items() we visit all keys and not used options cannot
be detected.

Rebase instructions:
- squash with "Add referred parts' hash strings in
  __buildout_signature__, that invokes rebuild of a part
  when one of its (recursive) dependencies are modified"
- add a comment explaining why such a lower level API is used
parent a18888ee
...@@ -1434,8 +1434,9 @@ class Options(DictMixin): ...@@ -1434,8 +1434,9 @@ class Options(DictMixin):
self.buildout._parts.append(name) self.buildout._parts.append(name)
m = md5() m = md5()
for item in sorted(self.items()): for key in sorted(self.keys()):
m.update(('%r\0%r\0' % item).encode()) value = self._data.get(key, self._cooked.get(key, self._raw.get(key)))
m.update(('%r\0%r\0' % (key, value)).encode())
self.items_signature = '%s:%s' % (name, m.hexdigest()) self.items_signature = '%s:%s' % (name, m.hexdigest())
def _do_extend_raw(self, name, data, doing): def _do_extend_raw(self, name, data, doing):
......
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