|
|
@@ -203,6 +203,13 @@ class XmlManifest(object):
|
|
|
if p.groups:
|
|
|
e.setAttribute('groups', ','.join(p.groups))
|
|
|
|
|
|
+ for a in p.annotations:
|
|
|
+ if a.keep == "true":
|
|
|
+ ae = doc.createElement('annotation')
|
|
|
+ ae.setAttribute('name', a.name)
|
|
|
+ ae.setAttribute('value', a.value)
|
|
|
+ e.appendChild(ae)
|
|
|
+
|
|
|
if self._repo_hooks_project:
|
|
|
root.appendChild(doc.createTextNode(''))
|
|
|
e = doc.createElement('repo-hooks')
|
|
|
@@ -545,6 +552,8 @@ class XmlManifest(object):
|
|
|
for n in node.childNodes:
|
|
|
if n.nodeName == 'copyfile':
|
|
|
self._ParseCopyFile(project, n)
|
|
|
+ if n.nodeName == 'annotation':
|
|
|
+ self._ParseAnnotation(project, n)
|
|
|
|
|
|
return project
|
|
|
|
|
|
@@ -556,6 +565,17 @@ class XmlManifest(object):
|
|
|
# dest is relative to the top of the tree
|
|
|
project.AddCopyFile(src, dest, os.path.join(self.topdir, dest))
|
|
|
|
|
|
+ def _ParseAnnotation(self, project, node):
|
|
|
+ name = self._reqatt(node, 'name')
|
|
|
+ value = self._reqatt(node, 'value')
|
|
|
+ try:
|
|
|
+ keep = self._reqatt(node, 'keep').lower()
|
|
|
+ except ManifestParseError:
|
|
|
+ keep = "true"
|
|
|
+ if keep != "true" and keep != "false":
|
|
|
+ raise ManifestParseError, "optional \"keep\" attribute must be \"true\" or \"false\""
|
|
|
+ project.AddAnnotation(name, value, keep)
|
|
|
+
|
|
|
def _get_remote(self, node):
|
|
|
name = node.getAttribute('remote')
|
|
|
if not name:
|