From: "Ashley E Desimone" <ashley.e.desimone@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Bjorge, Erik C" <erik.c.bjorge@intel.com>
Cc: "Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
"Pandya, Puja" <puja.pandya@intel.com>,
Bret Barkelew <Bret.Barkelew@microsoft.com>,
"Agyeman, Prince" <prince.agyeman@intel.com>
Subject: Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v2 3/3] EdkRepo: Fix submodule failures when switching combos.
Date: Fri, 19 Jun 2020 18:19:03 +0000 [thread overview]
Message-ID: <BY5PR11MB3973D7B3A74AC74D02613188B2980@BY5PR11MB3973.namprd11.prod.outlook.com> (raw)
In-Reply-To: <3b74e29011f804ef0b9f8da81a6535dc7ea71ae0.1591827056.git.erik.c.bjorge@intel.com>
Pushed as: 2392e3fa84883958822e056ae35f5b4afade5a80
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bjorge, Erik C
Sent: Wednesday, June 10, 2020 3:14 PM
To: devel@edk2.groups.io
Cc: Desimone, Ashley E <ashley.e.desimone@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Agyeman, Prince <prince.agyeman@intel.com>
Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v2 3/3] EdkRepo: Fix submodule failures when switching combos.
When switching combinations or checking out pins the submodule information may change or have modifications that will cause errors.
Before changing to a new combination all submodules should be removed.
Cc: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.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: Erik Bjorge <erik.c.bjorge@intel.com>
---
edkrepo/commands/checkout_pin_command.py | 5 ++--- edkrepo/common/common_repo_functions.py | 11 ++++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/edkrepo/commands/checkout_pin_command.py b/edkrepo/commands/checkout_pin_command.py
index 9d7346a..39c5aeb 100644
--- a/edkrepo/commands/checkout_pin_command.py
+++ b/edkrepo/commands/checkout_pin_command.py
@@ -22,7 +22,7 @@ from edkrepo.common.workspace_maintenance.manifest_repos_maintenance import list
from edkrepo.common.workspace_maintenance.manifest_repos_maintenance import find_source_manifest_repo from edkrepo.config.config_factory import get_workspace_path, get_workspace_manifest from edkrepo_manifest_parser.edk_manifest import ManifestXml-from project_utils.submodule import deinit_submodules, maintain_submodules+from project_utils.submodule import deinit_full, maintain_submodules class CheckoutPinCommand(EdkrepoCommand):@@ -71,8 +71,7 @@ class CheckoutPinCommand(EdkrepoCommand):
print(SPARSE_RESET) reset_sparse_checkout(workspace_path, manifest_sources) submodule_combo = pin.general_config.current_combo- deinit_submodules(workspace_path, manifest, manifest.general_config.current_combo,- pin, submodule_combo, args.verbose)+ deinit_full(workspace_path, manifest, args.verbose) pin_repo_sources = pin.get_repo_sources(pin.general_config.current_combo) try: checkout_repos(args.verbose, args.override, pin_repo_sources, workspace_path, manifest)diff --git a/edkrepo/common/common_repo_functions.py b/edkrepo/common/common_repo_functions.py
index 8c79f3d..59c198f 100644
--- a/edkrepo/common/common_repo_functions.py
+++ b/edkrepo/common/common_repo_functions.py
@@ -68,7 +68,7 @@ from edkrepo_manifest_parser.edk_manifest_validation import validate_manifestrep from edkrepo_manifest_parser.edk_manifest_validation import get_manifest_validation_status from edkrepo_manifest_parser.edk_manifest_validation import print_manifest_errors from edkrepo_manifest_parser.edk_manifest_validation import validate_manifestfiles-from project_utils.submodule import deinit_submodules, maintain_submodules+from project_utils.submodule import deinit_full, maintain_submodules CLEAR_LINE = '\x1b[K' DEFAULT_REMOTE_NAME = 'origin'@@ -498,10 +498,6 @@ def checkout(combination_or_sha, verbose=False, override=False, log=None):
log=log) initial_repo_sources = manifest.get_repo_sources(manifest.general_config.current_combo) - # Deinit any submodules that have been removed.- deinit_submodules(workspace_path, manifest, manifest.general_config.current_combo,- manifest, submodule_combo, verbose)- # Disable sparse checkout current_repos = initial_repo_sources sparse_enabled = sparse_checkout_enabled(workspace_path, initial_repo_sources)@@ -524,6 +520,11 @@ def checkout(combination_or_sha, verbose=False, override=False, log=None):
print(SPARSE_RESET) reset_sparse_checkout(workspace_path, current_repos) + # Deinit all submodules due to the potential for issues when switching+ # branches.+ if combo_or_sha != manifest.general_config.current_combo:+ deinit_full(workspace_path, manifest, verbose)+ print(CHECKING_OUT_COMBO.format(combo_or_sha)) try:--
2.27.0.windows.1
-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#61101): https://edk2.groups.io/g/devel/message/61101
Mute This Topic: https://groups.io/mt/74807390/1860321
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [ashley.e.desimone@intel.com] -=-=-=-=-=-=
next prev parent reply other threads:[~2020-06-19 18:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 22:13 [edk2-staging/EdkRepo] [PATCH v2 0/3] Small fixes to submodule support Bjorge, Erik C
2020-06-10 22:13 ` [edk2-staging/EdkRepo] [PATCH v2 1/3] EdkRepo: Add force flag when removing submodules Bjorge, Erik C
2020-06-19 18:17 ` Ashley E Desimone
2020-06-10 22:13 ` [edk2-staging/EdkRepo] [PATCH v2 2/3] EdkRepo: Adding backwards compatibility for old pin files Bjorge, Erik C
2020-06-19 18:18 ` Ashley E Desimone
2020-06-10 22:13 ` [edk2-staging/EdkRepo] [PATCH v2 3/3] EdkRepo: Fix submodule failures when switching combos Bjorge, Erik C
2020-06-19 18:19 ` Ashley E Desimone [this message]
2020-06-10 23:55 ` [edk2-staging/EdkRepo] [PATCH v2 0/3] Small fixes to submodule support Ashley E Desimone
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=BY5PR11MB3973D7B3A74AC74D02613188B2980@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