From 55ee304304a0d83bfa23984c45e46eebdd184124 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Wed, 6 Apr 2022 17:10:21 +0000 Subject: Fix sub manifest handling Also fixes some typos Change-Id: Id2ba5834ba3a74ed3f29c36d2c0030737dc63e35 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/334579 Tested-by: LaMont Jones Reviewed-by: Mike Frysinger --- manifest_xml.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'manifest_xml.py') diff --git a/manifest_xml.py b/manifest_xml.py index 022cad20..02f09db9 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -243,12 +243,13 @@ class _XmlSubmanifest: manifestFile = parent.SubmanifestInfoDir( os.path.join(parent.path_prefix, self.relpath), os.path.join('manifests', manifestName or 'default.xml')) + linkFile = parent.SubmanifestInfoDir( + os.path.join(parent.path_prefix, self.relpath), MANIFEST_FILE_NAME) rc = self.repo_client = RepoClient( - parent.repodir, manifestFile, parent_groups=','.join(groups) or '', + parent.repodir, linkFile, parent_groups=','.join(groups) or '', submanifest_path=self.relpath, outer_client=outer_client) - self.present = os.path.exists(os.path.join(self.repo_client.subdir, - MANIFEST_FILE_NAME)) + self.present = os.path.exists(manifestFile) def __eq__(self, other): if not isinstance(other, _XmlSubmanifest): @@ -1051,7 +1052,7 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md tree.present = present elif not os.path.exists(self.subdir): tree.present = False - if tree.present: + if present and tree.present: tree.repo_client._Load(initial_client=initial_client, submanifest_depth=submanifest_depth + 1) -- cgit v1.2.3-54-g00ecf