From nobody Mon Apr 29 06:35:04 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+58900+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+58900+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1588965306; cv=none; d=zohomail.com; s=zohoarc; b=ZKAhQFcObrDXN3824tDwYDZAF0+hkumKODwZOkRiPBKiv7ZFg/gYnB8MTNhx5IuiB/8FMymP1S8DYNloi56+z38pdip9iw5c46g28slvAg8KfrDbTqtphTQA1/GsOw/xwc2zAuya2PrqAAsl+PZiJA46uZKx5klkfkergZUfUfg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588965306; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=PuuTWp6kzq1M6I+RHdbwfCkHL5JAvHeeuGyq050JTjo=; b=AdV4mu2AjuQfRdblAayybE+WERvZZPRlTnfX1o/IycO7IIGfNtmQDJMfUUZd2XJ27X2TMC/eIRuW5gPKSG9F/hS1X/4R5az5Ft2SFrCQthedzr30dMIIDkgDM8gAuHhxy5MDWJIvU9hSVP/iJrU54Z++C1RWaGpZ4DOMX9N01Bo= 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+58900+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 1588965306879596.7297626405883; Fri, 8 May 2020 12:15:06 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id YsRtYY1788612xMTTyoZn3gq; Fri, 08 May 2020 12:15:06 -0700 X-Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web12.1934.1588965305480380213 for ; Fri, 08 May 2020 12:15:05 -0700 IronPort-SDR: uE/JEEa9bYwk9DILiH3LYTAeGCnlyEifOD8FpfuWGZW8cG2g5AGHDJyWYLlWeiiEQ907lJiSoJ ndSrtclJH4TA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2020 12:15:03 -0700 IronPort-SDR: ssnV2KvLeI/Xe3aecsu5I4MdCfGSenSHredBuaEXSTUdfVjaC1jCK8ufa4ziCGc8cmctu8AHF+ VUTcuT4imw9w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,368,1583222400"; d="scan'208";a="250551539" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.212.16.147]) by fmsmga007.fm.intel.com with ESMTP; 08 May 2020 12:15:03 -0700 From: "Ashley E Desimone" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Erik Bjorge , Bret Barkelew , Prince Agyeman Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH V2] EkdRepo: Update Checkout Pin to Support Multiple Manifest Repos Date: Fri, 8 May 2020 12:14:56 -0700 Message-Id: <20200508191456.10508-1-ashley.e.desimone@intel.com> 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,ashley.e.desimone@intel.com X-Gm-Message-State: f41aDwoiE0h3goNdQLdplLGwx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1588965306; bh=XGzTEZHY9kCIKAgzRYg2zdg6+1itciERHgDfJ5GIfNo=; h=Cc:Date:From:Reply-To:Subject:To; b=VC+Nwsb7pFkfz4tIucJjSo5PIcrs71VzeDDY+kTkILfMr/xdGf+J6riLnvbmQdFnZuk YRFWsLXQcHGC/gwEw+5Wyz0FDRSjuyEsJIFGSSFgVEsUWw0NH9LpSiAylN9N6ipIdV9P1 HlfNALes88f6PrJU8Rxu0vFy5g89npbfp2s= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Update the checkout pin command to look for pin files only in the workspace's source manifest repository. Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman Reviewed-by: Nate DeSimone --- edkrepo/commands/checkout_pin_command.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/edkrepo/commands/checkout_pin_command.py b/edkrepo/commands/ch= eckout_pin_command.py index 31df825..4aaf2b5 100644 --- a/edkrepo/commands/checkout_pin_command.py +++ b/edkrepo/commands/checkout_pin_command.py @@ -11,13 +11,15 @@ import os =20 from git import Repo =20 -from edkrepo.commands.edkrepo_command import EdkrepoCommand, OverrideArgum= ent +from edkrepo.commands.edkrepo_command import EdkrepoCommand, OverrideArgum= ent, SourceManifestRepoArgument import edkrepo.commands.arguments.checkout_pin_args as arguments 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.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 from edkrepo.config.config_factory import get_workspace_path, get_workspac= e_manifest from edkrepo_manifest_parser.edk_manifest import ManifestXml =20 @@ -38,12 +40,21 @@ class CheckoutPinCommand(EdkrepoCommand): 'required' : True, 'help-text' : arguments.PIN_FILE_HELP}) args.append(OverrideArgument) + args.append(SourceManifestRepoArgument) return metadata =20 def run_command(self, args, config): workspace_path =3D get_workspace_path() manifest =3D get_workspace_manifest() - pin_path =3D self.__get_pin_path(args, workspace_path, config['cfg= _file'].manifest_repo_abs_local_path, manifest) + + manifest_repo =3D find_source_manifest_repo(manifest, config['cfg_= file'], config['user_cfg_file'], args.source_manifest_repo) + cfg, user_cfg, conflicts =3D list_available_manifest_repos(config[= 'cfg_file'], config['user_cfg_file']) + if manifest_repo in cfg: + manifest_repo_path =3D config['cfg_file'].manifest_repo_abs_pa= th(manifest_repo) + elif manifest_repo in user_cfg: + manifest_repo_path =3D config['user_cfg_file'].manifest_repo_a= bs_path(manifest_repo) + + pin_path =3D self.__get_pin_path(args, workspace_path, manifest_re= po_path, manifest) pin =3D ManifestXml(pin_path) manifest_sources =3D manifest.get_repo_sources(manifest.general_co= nfig.current_combo) check_dirty_repos(manifest, workspace_path) --=20 2.16.2.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 (#58900): https://edk2.groups.io/g/devel/message/58900 Mute This Topic: https://groups.io/mt/74080602/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-