From nobody Mon May 6 19:56:02 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+58766+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+58766+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1588816761; cv=none; d=zohomail.com; s=zohoarc; b=DEJoldj2sVPUeCDClJCksMG3tGEvhnKwptjtQMLiKLSvAlfN+uOvz+g9noH/WdQGHhIXYFzuwuQ0K9dWlakgsFKl+rg026FiwX1TERig7zSsfkbV4dQv7SuSor2QdIYdyLMLTnzFJytVI3fEcxUmc0vXUvOSncIM07OsE0kXh5Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588816761; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=i9146hGAKBC/t4uffZXWlKO8mgVvuo8aGwd3jbFoIBk=; b=ABoQaJ4bA0ERiLvZzynh6Cg/UPCIkw1uvFJm0henwQbSl+342bIzv4wEuZ2B6Ie3FcBfVIlhFkLc66tiWTs7eimDkjLAfDvKPM+CRdzmf2Og0rvC6vRW7boeI5f6iMWppwIimGQPJF3XcYY95E773si9ap7C4JIBpcMegqMTS60= 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+58766+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 1588816761869497.353739820868; Wed, 6 May 2020 18:59:21 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id EdoQYY1788612xISAPfMrrf0; Wed, 06 May 2020 18:59:21 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.2967.1588816760418133382 for ; Wed, 06 May 2020 18:59:20 -0700 IronPort-SDR: YAUqg2ujherxHxrUE+UMSUmjuM7SDaTA9dHWTwB4Kzq7ZKFXy6ARFdqh8M9709ifg3CXtPD+z1 QncW9Iskgu7Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2020 18:59:19 -0700 IronPort-SDR: IYR95uY2RDE3+2aqEzDhrdcfFp0e2/1jfbY6jyFhIBDRTPlXhHm4aQFbj6oqZQvMhnOxhBLZea grmzf0P/eVrw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,361,1583222400"; d="scan'208";a="339205673" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.254.1.137]) by orsmga001.jf.intel.com with ESMTP; 06 May 2020 18:59:19 -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] EkdRepo: Update Checkout Pin to Support Multiple Manifest Repos Date: Wed, 6 May 2020 18:59:17 -0700 Message-Id: <20200507015917.2704-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: yyN4JTVW2TzHKEooUUMJRYl0x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1588816761; bh=K1sjnqQ05b8VwiWtGECUubDWPHMkaQX7Cv6vOceYepU=; h=Cc:Date:From:Reply-To:Subject:To; b=hE4VOjbwG0zQ1MkbXXf1M7PXItjSVDZw+q4KuPk9SQrKZ3NNFwXr1Vnpuo3Zp3F7AR1 dRBYg/HY+q1Kx4D50zQIEqRL2tGY1fF7SQ9uyeV4l/H7Dlrh8oNB9PotPYpWXyBsp2WQz uFJAoFIkNWxWXQB4jhlR7dRQAXQ85nAgiGs= 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 --- edkrepo/commands/checkout_pin_command.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/edkrepo/commands/checkout_pin_command.py b/edkrepo/commands/ch= eckout_pin_command.py index 31df825..5272236 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 find_project_in_all_indices +from edkrepo.common.workspace_maintenance.humble.manifest_repos_maintenanc= e_humble import PROJ_NOT_IN_REPO, SOURCE_MANIFEST_REPO_NOT_FOUND 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,25 @@ 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, cfg, manifest_path =3D find_project_in_all_indices = (manifest.project_info.codename, + c= onfig['cfg_file'], + c= onfig['user_cfg_file'], + P= ROJ_NOT_IN_REPO.format(manifest.project_info.codename), + S= OURCE_MANIFEST_REPO_NOT_FOUND.format(manifest.project_info.codename), + a= rgs.source_manifest_repo) + if 'user' not in cfg: + manifest_repo_path =3D config['cfg_file'].manifest_repo_abs_pa= th(manifest_repo) + else: + 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 (#58766): https://edk2.groups.io/g/devel/message/58766 Mute This Topic: https://groups.io/mt/74043047/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-