public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ashley E Desimone" <ashley.e.desimone@intel.com>
To: "Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Pandya, Puja" <puja.pandya@intel.com>,
	Bret Barkelew <Bret.Barkelew@microsoft.com>,
	"Agyeman, Prince" <prince.agyeman@intel.com>,
	"Bjorge, Erik C" <erik.c.bjorge@intel.com>
Subject: Re: [edk2-staging/EdkRepo] [PATCH V1] EdkRepo: edkrepo clone fails when given an archived project name
Date: Mon, 14 Sep 2020 20:21:01 +0000	[thread overview]
Message-ID: <BY5PR11MB39737990227030590A27E5E2B2230@BY5PR11MB3973.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200912175236.2086-1-nathaniel.l.desimone@intel.com>

Reviewed-by: Ashley DeSimone <ashley.e.desimone@intel.com>

-----Original Message-----
From: Nate DeSimone <nathaniel.l.desimone@intel.com> 
Sent: Saturday, September 12, 2020 10:53 AM
To: devel@edk2.groups.io
Cc: Desimone, Ashley E <ashley.e.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Agyeman, Prince <prince.agyeman@intel.com>; Bjorge, Erik C <erik.c.bjorge@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.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@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


      reply	other threads:[~2020-09-14 20:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-12 17:52 [edk2-staging/EdkRepo] [PATCH V1] EdkRepo: edkrepo clone fails when given an archived project name Nate DeSimone
2020-09-14 20:21 ` Ashley E Desimone [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BY5PR11MB39737990227030590A27E5E2B2230@BY5PR11MB3973.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox