* [edk2-staging/EdkRepo] [PATCH] EdkRepo: Allow pin file to be checked out when combo is not in project manifest
@ 2020-04-01 0:51 Desimone, Ashley E
2020-04-02 6:09 ` Nate DeSimone
2020-04-03 22:24 ` Nate DeSimone
0 siblings, 2 replies; 3+ messages in thread
From: Desimone, Ashley E @ 2020-04-01 0:51 UTC (permalink / raw)
To: devel
Cc: Nate DeSimone, Puja Pandya, Erik Bjorge, Bret Barkelew,
Prince Agyeman
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Allow pin file to be checked out when combo is not in project manifest
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
1 sibling, 0 replies; 3+ messages in thread
From: Nate DeSimone @ 2020-04-02 6:09 UTC (permalink / raw)
To: Desimone, Ashley E, devel@edk2.groups.io
Cc: Pandya, Puja, Bjorge, Erik C, Bret Barkelew, Agyeman, Prince
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Allow pin file to be checked out when combo is not in project manifest
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
1 sibling, 0 replies; 3+ messages in thread
From: Nate DeSimone @ 2020-04-03 22:24 UTC (permalink / raw)
To: Desimone, Ashley E, devel@edk2.groups.io
Cc: Pandya, Puja, Bjorge, Erik C, Bret Barkelew, Agyeman, Prince
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-03 22:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox