From a8cf575d68e7e211292d967f4a12cf609a028b20 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Fri, 15 Jul 2022 20:31:33 +0000 Subject: Omit local_manifest groups from superproject override. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we create superproject_override.xml, do not include projects that are present from local_manifests/*. Such projects are fully under the control of the local_manifests/ file. Bug: b/238934278 Test: manual, ./run_tests Change-Id: I40382ceb82d9cf7b8dc7b5f2abed3f6d4d80017e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/340877 Tested-by: Xin Li Reviewed-by: Xin Li Reviewed-by: Sam Saccone 🐐 --- manifest_xml.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'manifest_xml.py') diff --git a/manifest_xml.py b/manifest_xml.py index 32f6b687..12614c64 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -502,7 +502,8 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md """ return [x for x in re.split(r'[,\s]+', field) if x] - def ToXml(self, peg_rev=False, peg_rev_upstream=True, peg_rev_dest_branch=True, groups=None): + def ToXml(self, peg_rev=False, peg_rev_upstream=True, + peg_rev_dest_branch=True, groups=None, omit_local=False): """Return the current manifest XML.""" mp = self.manifestProject @@ -583,6 +584,9 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md if not p.MatchesGroups(groups): return + if omit_local and self.IsFromLocalManifest(p): + return + name = p.name relpath = p.relpath if parent: -- cgit v1.2.3-54-g00ecf