From 7da1314e38a2bb2941511c9003fa388eddb55c0a Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Fri, 15 Jun 2012 02:24:20 -0700 Subject: Inject the project name into each projects groups. For CrOS, we have scenarios were people checkout a smaller version of our manifest via groups, and enable individual repositories as needed for their work. Previously this was via local_manifest manipulation, which breaks via manifest-groups would require a remove-project tag. Via injecting the projects name into the projects groups, this allows us to instead manipulate the configured groups allowing the user to turn on/off projects as necessary. Change-Id: I07b7918e16cc9dc28eb47e19a46a04dc4fd0be74 --- manifest_xml.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'manifest_xml.py') diff --git a/manifest_xml.py b/manifest_xml.py index a46cf24e..86899f63 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -566,8 +566,9 @@ class XmlManifest(object): if node.hasAttribute('groups'): groups = node.getAttribute('groups') groups = [x for x in re.split('[,\s]+', groups) if x] - if 'default' not in groups: - groups.append('default') + + default_groups = ['default', 'name:%s' % name, 'path:%s' % path] + groups.extend(set(default_groups).difference(groups)) if self.IsMirror: relpath = None -- cgit v1.2.3-54-g00ecf