From nobody Sun Feb 8 21:53:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+61101+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+61101+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1591827278; cv=none; d=zohomail.com; s=zohoarc; b=P0dHU/UmyiUhN1CkdBnNowz1OhwU12mmMSQ4GLTjhD+6q8a3rDPCVYTdd2I3f1ZWQBp7H5UGsO8RLum5a1BNTOCYQkhph32yRAfHagw8m9Ty24siEHUZuHcKJTpg4whC8v6czsz8OycikkgcDL+HGrX8ZY7cNUvq6nIU1w8ti7g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591827278; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=tlXbwCZ0KXEOlP0LGvoghYOJXY9bBzfCW7zqXmemGSQ=; b=D9kSfAAA0/K01NqrAIVXu7C3zrhmQOt85GmIKJh4alIAiwXKFudhODCmV1d9i8TOcMd43qBSsevGXEiLCt9oJyu1K9xKgh7CiYncFxrbUKtMUSmx4olo081xrfXAuQ7/tToDXiQ+YwEf0q6rWWHfFb8C/CRv2+OMaOjnecqn+ro= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+61101+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1591827278439957.9308661711094; Wed, 10 Jun 2020 15:14:38 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id mJZgYY1788612xO5dRXT0Gom; Wed, 10 Jun 2020 15:14:38 -0700 X-Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.5937.1591827277609052162 for ; Wed, 10 Jun 2020 15:14:37 -0700 IronPort-SDR: 7Ltvx5kkY3eE0GOqI3/B5AaiTcnOzLR4EF97Ukx2vODY9tPzF9TRAIx8X1F+o20MkX0pJb6y1T WKAgckKP1uwA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2020 15:14:37 -0700 IronPort-SDR: e6quNWBL7erZY5qGsb5etEod88EPibQxAfyW60VYIXIkHJWv2CR/k+REf86O1gvT6q1+bigZfT 1vtdQWi6UfXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,497,1583222400"; d="scan'208";a="289345901" X-Received: from sfp-ecbjorge.amr.corp.intel.com ([10.165.41.176]) by orsmga002.jf.intel.com with ESMTP; 10 Jun 2020 15:14:37 -0700 From: "Bjorge, Erik C" To: devel@edk2.groups.io Cc: Ashley E Desimone , Nate DeSimone , Puja Pandya , Bret Barkelew , Prince Agyeman Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v2 3/3] EdkRepo: Fix submodule failures when switching combos. Date: Wed, 10 Jun 2020 15:13:55 -0700 Message-Id: <3b74e29011f804ef0b9f8da81a6535dc7ea71ae0.1591827056.git.erik.c.bjorge@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,erik.c.bjorge@intel.com X-Gm-Message-State: jdzqPp5H3azztEp2hmZ7NiQGx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1591827278; bh=62VOSKAghaCrTKInSgDaxSSObipZd0n4Rm9sYiFKGbE=; h=Cc:Date:From:Reply-To:Subject:To; b=bzWsQ0P4nIOwXO8PcsWAkDMvitoyH7v0cOxcPpNILV4Bagu0kA3NxJKfKBmVlx0O9D1 1DlhBSgcSnpLCgq60o20bpIriV60R1UciZGuZ58DykuzrcuGcaLUN9sxTBS4lPhKTCyOf OOnS/Eck8YFv9MPQI7T1oBgKee0lJoAbr0c= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 Cc: Nate DeSimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Cc: Erik Bjorge Signed-off-by: Erik Bjorge --- 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/ch= eckout_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 impor= t find_source_manifest_repo from edkrepo.config.config_factory import get_workspace_path, get_workspac= e_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 =20 =20 class CheckoutPinCommand(EdkrepoCommand): @@ -71,8 +71,7 @@ class CheckoutPinCommand(EdkrepoCommand): print(SPARSE_RESET) reset_sparse_checkout(workspace_path, manifest_sources) submodule_combo =3D pin.general_config.current_combo - deinit_submodules(workspace_path, manifest, manifest.general_confi= g.current_combo, - pin, submodule_combo, args.verbose) + deinit_full(workspace_path, manifest, args.verbose) pin_repo_sources =3D pin.get_repo_sources(pin.general_config.curre= nt_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/commo= n_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 impo= rt validate_manifestrep from edkrepo_manifest_parser.edk_manifest_validation import get_manifest_v= alidation_status from edkrepo_manifest_parser.edk_manifest_validation import print_manifest= _errors from edkrepo_manifest_parser.edk_manifest_validation import validate_manif= estfiles -from project_utils.submodule import deinit_submodules, maintain_submodules +from project_utils.submodule import deinit_full, maintain_submodules =20 CLEAR_LINE =3D '\x1b[K' DEFAULT_REMOTE_NAME =3D 'origin' @@ -498,10 +498,6 @@ def checkout(combination_or_sha, verbose=3DFalse, over= ride=3DFalse, log=3DNone): log=3Dlog) initial_repo_sources =3D manifest.get_repo_sources(manifest.general_co= nfig.current_combo) =20 - # Deinit any submodules that have been removed. - deinit_submodules(workspace_path, manifest, manifest.general_config.cu= rrent_combo, - manifest, submodule_combo, verbose) - # Disable sparse checkout current_repos =3D initial_repo_sources sparse_enabled =3D sparse_checkout_enabled(workspace_path, initial_rep= o_sources) @@ -524,6 +520,11 @@ def checkout(combination_or_sha, verbose=3DFalse, over= ride=3DFalse, log=3DNone): print(SPARSE_RESET) reset_sparse_checkout(workspace_path, current_repos) =20 + # Deinit all submodules due to the potential for issues when switching + # branches. + if combo_or_sha !=3D manifest.general_config.current_combo: + deinit_full(workspace_path, manifest, verbose) + print(CHECKING_OUT_COMBO.format(combo_or_sha)) =20 try: --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- 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/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-