From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: "Desimone, Ashley E" <ashley.e.desimone@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Pandya, Puja" <puja.pandya@intel.com>,
"Bjorge, Erik C" <erik.c.bjorge@intel.com>,
Bret Barkelew <Bret.Barkelew@microsoft.com>,
"Agyeman, Prince" <prince.agyeman@intel.com>
Subject: Re: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Allow pin file to be checked out when combo is not in project manifest
Date: Fri, 3 Apr 2020 22:24:04 +0000 [thread overview]
Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5E35902@ORSMSX114.amr.corp.intel.com> (raw)
In-Reply-To: <20200401005118.24224-1-ashley.e.desimone@intel.com>
Pushed: https://github.com/tianocore/edk2-staging/commit/1c768b9f
-----Original Message-----
From: Desimone, Ashley E <ashley.e.desimone@intel.com>
Sent: Tuesday, March 31, 2020 5:51 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>; Bjorge, Erik C <erik.c.bjorge@intel.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Agyeman, Prince <prince.agyeman@intel.com>
Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Allow pin file to be checked out when combo is not in project manifest
When a pin file is based on a combo that is not in the project manifest file but otherwise matches the project print a warning instead of throwing and exception and allow the pin to be checked out.
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
---
edkrepo/commands/checkout_pin_command.py | 10 ++++++++--
edkrepo/commands/humble/checkout_pin_humble.py | 4 +++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/edkrepo/commands/checkout_pin_command.py b/edkrepo/commands/checkout_pin_command.py
index 619fcf8..72075bf 100644
--- a/edkrepo/commands/checkout_pin_command.py
+++ b/edkrepo/commands/checkout_pin_command.py
@@ -90,11 +90,17 @@ class CheckoutPinCommand(EdkrepoCommand):
elif not set(pin.remotes).issubset(set(manifest.remotes)):
raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH)
elif pin.general_config.current_combo not in [c.name for c in manifest.combinations]:
- raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH)
+
+ print(humble.COMBO_NOT_FOUND.format(pin.general_config.current_combo))
combo_name = pin.general_config.current_combo
pin_sources = pin.get_repo_sources(combo_name)
pin_root_remote = {source.root:source.remote_name for source in pin_sources}
- manifest_sources = manifest.get_repo_sources(combo_name)
+ try:
+ # If the pin and the project manifest have the same combo get the
+ # repo sources from that combo. Otherwise get the default combo's
+ # repo sources
+ manifest_sources = manifest.get_repo_sources(combo_name)
+ except ValueError:
+ manifest_sources =
+ manifest.get_repo_sources(manifest.general_config.default_combo)
manifest_root_remote = {source.root:source.remote_name for source in manifest_sources}
if set(pin_root_remote.items()).isdisjoint(set(manifest_root_remote.items())):
raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH)
diff --git a/edkrepo/commands/humble/checkout_pin_humble.py b/edkrepo/commands/humble/checkout_pin_humble.py
index ac7467d..ec6938d 100644
--- a/edkrepo/commands/humble/checkout_pin_humble.py
+++ b/edkrepo/commands/humble/checkout_pin_humble.py
@@ -12,4 +12,6 @@ NOT_FOUND = 'The selected PIN file was not found.'
MANIFEST_MISMATCH = ('The selected PIN file does not refer to the same project '
'as the local manifest file. {}'.format(CHP_EXIT)) COMMIT_NOT_FOUND = 'The commit referenced by the PIN file does not exist. {}'.format(CHP_EXIT) -PIN_COMBO = 'Pin: {}'
\ No newline at end of file
+PIN_COMBO = 'Pin: {}'
+COMBO_NOT_FOUND = ('Warning: The combo listed in PIN file: {} is no longer '
+ 'listed in the project manifest file.')
\ No newline at end of file
--
2.16.2.windows.1
prev parent reply other threads:[~2020-04-03 22:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 0:51 [edk2-staging/EdkRepo] [PATCH] EdkRepo: Allow pin file to be checked out when combo is not in project manifest Desimone, Ashley E
2020-04-02 6:09 ` Nate DeSimone
2020-04-03 22:24 ` Nate 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=02A34F284D1DA44BB705E61F7180EF0AB5E35902@ORSMSX114.amr.corp.intel.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