Reviewed-by: Ashley DeSimone <ashley.e.desim...@intel.com> -----Original Message----- From: Nate DeSimone <nathaniel.l.desim...@intel.com> Sent: Saturday, September 12, 2020 10:53 AM To: devel@edk2.groups.io Cc: Desimone, Ashley E <ashley.e.desim...@intel.com>; Pandya, Puja <puja.pan...@intel.com>; Bret Barkelew <bret.barke...@microsoft.com>; Agyeman, Prince <prince.agye...@intel.com>; Bjorge, Erik C <erik.c.bjo...@intel.com> Subject: [edk2-staging/EdkRepo] [PATCH V1] EdkRepo: edkrepo clone fails when given an archived project name
1. find_project_in_single_index() needs to search archived projects if the project name was not found in the active projects list 2. In a rare corner case, find_project_in_all_indices() can return to the caller without providing any return arguments. Now an exception will be raised. Cc: Ashley E Desimone <ashley.e.desim...@intel.com> Cc: Puja Pandya <puja.pan...@intel.com> Cc: Bret Barkelew <bret.barke...@microsoft.com> Cc: Prince Agyeman <prince.agye...@intel.com> Cc: Erik Bjorge <erik.c.bjo...@intel.com> Signed-off-by: Nate DeSimone <nathaniel.l.desim...@intel.com> --- .../workspace_maintenance/manifest_repos_maintenance.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/edkrepo/common/workspace_maintenance/manifest_repos_maintenance.py b/edkrepo/common/workspace_maintenance/manifest_repos_maintenance.py index db41e75..a57815d 100644 --- a/edkrepo/common/workspace_maintenance/manifest_repos_maintenance.py +++ b/edkrepo/common/workspace_maintenance/manifest_repos_maintenance.py @@ -148,6 +148,11 @@ def find_project_in_single_index (project, index_file, manifest_dir): proj_name = case_insensitive_single_match(project, index_file.project_list) except: proj_name = None + if proj_name is None: + try: + proj_name = case_insensitive_single_match(project, index_file.archived_project_list) + except: + proj_name = None if proj_name: ci_index_xml_rel_path = os.path.normpath(index_file.get_project_xml(proj_name)) global_manifest_path = os.path.join(manifest_dir, ci_index_xml_rel_path) @@ -219,6 +224,7 @@ def find_project_in_all_indices (project, edkrepo_cfg, edkrepo_user_cfg, except_ for dirpath, dirname, filenames in os.walk(edkrepo_user_cfg.manifest_repo_abs_path(repo)): if project in filenames: return repo, 'edkrepo_user_cfg', os.path.join(dirpath, project) + raise + EdkrepoManifestNotFoundException(humble.PROJ_NOT_IN_REPO.format(projec + t)) else: raise EdkrepoManifestNotFoundException(humble.PROJ_NOT_IN_REPO.format(project)) -- 2.27.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65231): https://edk2.groups.io/g/devel/message/65231 Mute This Topic: https://groups.io/mt/76805366/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-