From nobody Thu Apr 25 04:06:19 2024 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+63135+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+63135+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1595442417; cv=none; d=zohomail.com; s=zohoarc; b=clpkjxPI3wlFrZWG69ZdfqoWyu/oDXHp8hnZY5nxkCsP8wMJIOJebz2YW3faOY/bf5QsOvHN2Ig0/hf+PI7xcfXTFn25f7F1ws2giZwLCPxbNkUCHyF8ASsXrrfViXPJWEQ9KcmbJ4f4CJWW0jmY/r+2G7n7Tn18uaWCZRtoJMw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595442417; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=UT1TL6Aqd34XjlmChuifN/3yPzMM6MWm39e9EZDPHnQ=; b=Ul1WPEV5u2l6g3yuYAr+wU3OXfGPg7jHqClREZFMsSnUPOI2e7xSvFng+ZUPZKv3LKxFrAMXh8bZYr2X4dnFYeGCYtJpYnsThayfTmSiwtGJw+0wpRWC/tj4cabvzOobDfhtIugxliHUCD1awMpa9nnFv22p4kb7fHCVEtnw8/I= 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+63135+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 159544241791115.283136790934009; Wed, 22 Jul 2020 11:26:57 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id NA9ZYY1788612xdqrkls9Bza; Wed, 22 Jul 2020 11:26:57 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.25747.1595442416626890970 for ; Wed, 22 Jul 2020 11:26:56 -0700 IronPort-SDR: OYb/QMxlmU6jxDSX/XUcOvPtGs8MJyf+Wq/FjXtV7R6d5yzaWBJhvMS3YtbtazSXEUBa0VsLtC 00mp8qLRxZkA== X-IronPort-AV: E=McAfee;i="6000,8403,9690"; a="235273390" X-IronPort-AV: E=Sophos;i="5.75,383,1589266800"; d="scan'208";a="235273390" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2020 11:26:45 -0700 IronPort-SDR: yFkL7zMD46iO0SR8ZKjKQC8NB5j5vb1kxHVimii1zN/xtUIFWYqJtS6VzZzJP6bEXR9c7Mq6/r hYKCWLXBItXw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,383,1589266800"; d="scan'208";a="310730031" X-Received: from ecbjorge-mobl1.amr.corp.intel.com ([10.251.144.204]) by fmsmga004.fm.intel.com with ESMTP; 22 Jul 2020 11:26:45 -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 v1] EdkRepo: Continue checkout on submodule deinit errors Date: Wed, 22 Jul 2020 11:26:28 -0700 Message-Id: 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: eWlFPkgDkUBPUNsGLIqwjMFjx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1595442417; bh=gZYDywFBQyWPLdThLnje3H7nAGEHfTCCvwplojijetI=; h=Cc:Date:From:Reply-To:Subject:To; b=hzPMdwZYALtKJpNypJvRkR30ycJkWS3dqK54fgjMuhEjvekqDrxPO/6PJpCrIw5bYmb 8YrnyVBakcdQvK67/APdgTeAXnDUA72gnd2JWBcFWvfUDvx91qtBhiU4JumMvg3p3QXya 0aOKMgFDSbXGx4fLLqH7e1luXl2VR0U8CkY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" In some cases submodules may still not be deinitialzied even with the more aggressive deinit flags. In these cases the checkout will report a warning and attempt to continue the checkout process. Cc: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Cc: Erik Bjorge Signed-off-by: Erik Bjorge Reviewed-by: Ashley DeSimone --- edkrepo/commands/checkout_pin_command.py | 9 +++++++-- edkrepo/common/common_repo_functions.py | 8 +++++++- edkrepo/common/humble.py | 3 +++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/edkrepo/commands/checkout_pin_command.py b/edkrepo/commands/ch= eckout_pin_command.py index 39c5aeb..1c58113 100644 --- a/edkrepo/commands/checkout_pin_command.py +++ b/edkrepo/commands/checkout_pin_command.py @@ -16,7 +16,7 @@ import edkrepo.commands.arguments.checkout_pin_args as ar= guments import edkrepo.commands.humble.checkout_pin_humble as humble from edkrepo.common.common_repo_functions import sparse_checkout_enabled, = reset_sparse_checkout, sparse_checkout from edkrepo.common.common_repo_functions import check_dirty_repos, checko= ut_repos, combinations_in_manifest -from edkrepo.common.humble import SPARSE_CHECKOUT, SPARSE_RESET +from edkrepo.common.humble import SPARSE_CHECKOUT, SPARSE_RESET, SUBMODULE= _DEINIT_FAILED from edkrepo.common.edkrepo_exception import EdkrepoInvalidParametersExcep= tion, EdkrepoProjectMismatchException from edkrepo.common.workspace_maintenance.manifest_repos_maintenance impor= t list_available_manifest_repos from edkrepo.common.workspace_maintenance.manifest_repos_maintenance impor= t find_source_manifest_repo @@ -71,7 +71,12 @@ class CheckoutPinCommand(EdkrepoCommand): print(SPARSE_RESET) reset_sparse_checkout(workspace_path, manifest_sources) submodule_combo =3D pin.general_config.current_combo - deinit_full(workspace_path, manifest, args.verbose) + try: + deinit_full(workspace_path, manifest, args.verbose) + except Exception as e: + print(SUBMODULE_DEINIT_FAILED) + if args.verbose: + print(e) 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 313a1ca..a6a38cf 100644 --- a/edkrepo/common/common_repo_functions.py +++ b/edkrepo/common/common_repo_functions.py @@ -50,6 +50,7 @@ from edkrepo.common.humble import INCLUDED_URL_LINE, INCL= UDED_INSTEAD_OF_LINE, I from edkrepo.common.humble import ERROR_WRITING_INCLUDE, MULTIPLE_SOURCE_A= TTRIBUTES_SPECIFIED from edkrepo.common.humble import VERIFY_GLOBAL, VERIFY_ARCHIVED, VERIFY_P= ROJ, VERIFY_PROJ_FAIL from edkrepo.common.humble import VERIFY_PROJ_NOT_IN_INDEX, VERIFY_GLOBAL_= FAIL +from edkrepo.common.humble import SUBMODULE_DEINIT_FAILED from edkrepo.common.pathfix import get_actual_path from project_utils.sparse import BuildInfo, process_sparse_checkout from edkrepo.config.config_factory import get_workspace_path @@ -523,7 +524,12 @@ def checkout(combination_or_sha, verbose=3DFalse, over= ride=3DFalse, log=3DNone): # 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) + try: + deinit_full(workspace_path, manifest, verbose) + except Exception as e: + print(SUBMODULE_DEINIT_FAILED) + if verbose: + print(e) =20 print(CHECKING_OUT_COMBO.format(combo_or_sha)) =20 diff --git a/edkrepo/common/humble.py b/edkrepo/common/humble.py index f905357..763b9a6 100644 --- a/edkrepo/common/humble.py +++ b/edkrepo/common/humble.py @@ -155,3 +155,6 @@ BRANCH =3D ' Branch : {0}' COMMIT =3D ' Commit Id: {0}' WRITING_PIN_FILE =3D 'Writing pin file to {0} ...' COMMIT_MESSAGE =3D 'Pin file for project: {0} \nPin Description: {1}' + +# Common submodule error messages +SUBMODULE_DEINIT_FAILED =3D 'Warning: Unable to remove all submodule conte= nt' --=20 2.21.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 (#63135): https://edk2.groups.io/g/devel/message/63135 Mute This Topic: https://groups.io/mt/75730839/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-