From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web12.22422.1599933170982604171 for ; Sat, 12 Sep 2020 10:52:51 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: SB763xsV5BLr/zpbhyPxVTLKausJW2GC++YYH1xY38FK0usJ+e96vXKdOPBMCdGvkhNuEREbuV cWRdp0Ryruug== X-IronPort-AV: E=McAfee;i="6000,8403,9742"; a="138439393" X-IronPort-AV: E=Sophos;i="5.76,420,1592895600"; d="scan'208";a="138439393" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2020 10:52:48 -0700 IronPort-SDR: G92hf1mYdSx6z5TbKMBFVbAuw8rQY4vch6jFHSHZs2lQ+l3r6YGGHO12PJhmGIe/AIDpUCfMka Td9fOE350GHg== X-IronPort-AV: E=Sophos;i="5.76,420,1592895600"; d="scan'208";a="344950534" Received: from ohaun-mobl1.amr.corp.intel.com (HELO nldesimo-DESK1.amr.corp.intel.com) ([10.212.70.117]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2020 10:52:48 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Ashley E Desimone , Puja Pandya , Bret Barkelew , Prince Agyeman , Erik Bjorge Subject: [edk2-staging/EdkRepo] [PATCH V1] EdkRepo: edkrepo clone fails when given an archived project name Date: Sat, 12 Sep 2020 10:52:36 -0700 Message-Id: <20200912175236.2086-1-nathaniel.l.desimone@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Cc: Erik Bjorge Signed-off-by: Nate DeSimone --- .../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(project)) else: raise EdkrepoManifestNotFoundException(humble.PROJ_NOT_IN_REPO.format(project)) -- 2.27.0.windows.1