From 501733c2abb1180679f25b2f78970d73a2f8d413 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Wed, 20 Apr 2022 16:42:32 +0000 Subject: manifest: add submanifest.default_groups attribute When the user does not specify any manifest groups, this allows the parent manifest to indicate which manifest groups should be used for syncing the submanifest. Change-Id: I88806ed35013d13dd2ab3cd245fcd4f9061112c4 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/335474 Tested-by: LaMont Jones Reviewed-by: Mike Frysinger --- project.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'project.py') diff --git a/project.py b/project.py index 7afd6a79..2641c445 100644 --- a/project.py +++ b/project.py @@ -715,7 +715,8 @@ class Project(object): The special manifest group "default" will match any project that does not have the special project group "notdefault" """ - expanded_manifest_groups = manifest_groups or ['default'] + default_groups = self.manifest.default_groups or ['default'] + expanded_manifest_groups = manifest_groups or default_groups expanded_project_groups = ['all'] + (self.groups or []) if 'notdefault' not in expanded_project_groups: expanded_project_groups += ['default'] @@ -3496,7 +3497,7 @@ class ManifestProject(MetaProject): """ assert _kwargs_only == (), 'Sync only accepts keyword arguments.' - groups = groups or 'default' + groups = groups or self.manifest.GetDefaultGroupsStr(with_platform=False) platform = platform or 'auto' git_event_log = git_event_log or EventLog() if outer_manifest and self.manifest.is_submanifest: -- cgit v1.2.3-54-g00ecf