binman: Tidy up the vblock entry

At present if there are two vblock entries an image their contents are
written to the same file in the output directory. This prevents checking
the contents of each separately.

Fix this by adding part of the entry path to the filename, and add some
missing comments.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2018-09-14 04:57:11 -06:00
parent 35b384cbe5
commit a326b495cd
5 changed files with 43 additions and 4 deletions

View file

@ -456,3 +456,21 @@ features to produce new behaviours.
if missing:
raise ValueError('Documentation is missing for modules: %s' %
', '.join(missing))
def GetUniqueName(self):
"""Get a unique name for a node
Returns:
String containing a unique name for a node, consisting of the name
of all ancestors (starting from within the 'binman' node) separated
by a dot ('.'). This can be useful for generating unique filesnames
in the output directory.
"""
name = self.name
node = self._node
while node.parent:
node = node.parent
if node.name == 'binman':
break
name = '%s.%s' % (node.name, name)
return name