From nobody Sat May 4 14:03:33 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+56777+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+56777+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1585688432; cv=none; d=zohomail.com; s=zohoarc; b=LW+KNxwzv2NVBJ/ZU+aYJXX/jn9iE+X2gS1sKba3v8AoD+i1LGiScPhnLgmGryCaLwb2ELrXTyqIFYk0r5p+EoGohymXgHc5294aGfwYqeYRArom37rkhOea3oh6SsdT/yvDBlyEDfWoiV0XYycsqQY3qD3sdV3X31WHK1Plxz4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585688432; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=1fW92YWHJVQjG+FLRvLVLiDFnhhLPv6Qja8RiTRcOd0=; b=X85sE0JekVa83UA4MVRFmrsjU/oDuTAfN61QwLEemVnKe/STF6djJkPl/3roagWZdw6uVojJbkTsVqkbScw5nhXpRxR2cW5xfh0GsMVxJ9bbQpE0FOfpP2f4FlfGxYOoCM952TS2F4x0rcPyCoU9OOkCBqY3iYzh3no+Ex1ShMw= 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+56777+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 1585688432596801.4353359361763; Tue, 31 Mar 2020 14:00:32 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id lMy7YY1788612xpmQbzxQcFR; Tue, 31 Mar 2020 14:00:32 -0700 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web12.720.1585688430942869064 for ; Tue, 31 Mar 2020 14:00:31 -0700 IronPort-SDR: GOJ8qkO7O5wR7AAVfeaEyE4zv77lYzMitsm2RRas6bGmj0nUa8KQI06FsTY2QDN2j8m8dEfqLB AlK5YtCxuXHg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2020 14:00:30 -0700 IronPort-SDR: 3p3si0uRvqGsIag/uEgRZ8ADmcchaVYRISGkP3bIN7njSgaUa1toRuGN6Fi8Od6GdFL3EZ00TS G+/u9hoG3j+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,329,1580803200"; d="scan'208";a="422432548" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.7.159.171]) by orsmga005.jf.intel.com with ESMTP; 31 Mar 2020 14:00:30 -0700 From: "Desimone, Ashley E" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Erik Bjorge , Bret Barkelew , Prince Agyeman Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve state tracking when checking out pin files Date: Tue, 31 Mar 2020 14:00:23 -0700 Message-Id: <20200331210023.18080-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: 5Kl5yzqSxBSED2zV6mA9xnj8x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1585688432; bh=5OPwsNgXS9Aba+oe98FIyQ7hUL42CB8GHrhS384bLS8=; h=Cc:Date:From:Reply-To:Subject:To; b=ivz9SQR3WyiTPvRYx2WHfpomRWO9r+ZqrjUjtYew/EDdIheuXS7PV/hos8ksdQkTR72 V4wsdGLBRv3txBesTHAavypOG0cYvY/S71WCSq5MnoDM+FNBSnaJhMDt0ac4MEeDgVBIr qm80pil4AxeUIw38wbcHpvkjK3gpbo9qb3k= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Improves the state tracking when checking out onto a pin file by: (1)moving the call to write_current_combo() after the succesfull checkout, (2)changing the name of the combo written to the format: 'Pin: {pinfilename}', (3)If the current combo is a knon pin file (starts with 'Pin:') get_repo_sources() will return the repo sources from the default combo Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman Reviewed-by: Erik Bjorge Reviewed-by: Nate DeSimone --- edkrepo/commands/checkout_pin_command.py | 2 +- edkrepo/commands/humble/checkout_pin_humble.py | 3 ++- edkrepo_manifest_parser/edk_manifest.py | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/edkrepo/commands/checkout_pin_command.py b/edkrepo/commands/ch= eckout_pin_command.py index a2afc41..619fcf8 100644 --- a/edkrepo/commands/checkout_pin_command.py +++ b/edkrepo/commands/checkout_pin_command.py @@ -53,7 +53,6 @@ class CheckoutPinCommand(EdkrepoCommand): origin =3D repo.remotes.origin origin.fetch() self.__pin_matches_project(pin, manifest, workspace_path) - manifest.write_current_combo(pin.general_config.current_combo) sparse_enabled =3D sparse_checkout_enabled(workspace_path, manifes= t_sources) if sparse_enabled: print(SPARSE_RESET) @@ -61,6 +60,7 @@ class CheckoutPinCommand(EdkrepoCommand): 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) + manifest.write_current_combo(humble.PIN_COMBO.format(args.pinf= ile)) finally: if sparse_enabled: print(SPARSE_CHECKOUT) diff --git a/edkrepo/commands/humble/checkout_pin_humble.py b/edkrepo/comma= nds/humble/checkout_pin_humble.py index b5a9cfb..ac7467d 100644 --- a/edkrepo/commands/humble/checkout_pin_humble.py +++ b/edkrepo/commands/humble/checkout_pin_humble.py @@ -11,4 +11,5 @@ CHP_EXIT =3D 'Exiting without checkout out PIN data.' NOT_FOUND =3D 'The selected PIN file was not found.' MANIFEST_MISMATCH =3D ('The selected PIN file does not refer to the same p= roject ' 'as the local manifest file. {}'.format(CHP_EXIT)) -COMMIT_NOT_FOUND =3D 'The commit referenced by the PIN file does not exist= . {}'.format(CHP_EXIT)=20 \ No newline at end of file +COMMIT_NOT_FOUND =3D 'The commit referenced by the PIN file does not exist= . {}'.format(CHP_EXIT)=20 +PIN_COMBO =3D 'Pin: {}' \ No newline at end of file diff --git a/edkrepo_manifest_parser/edk_manifest.py b/edkrepo_manifest_par= ser/edk_manifest.py index dd3512b..2d3e79e 100644 --- a/edkrepo_manifest_parser/edk_manifest.py +++ b/edkrepo_manifest_parser/edk_manifest.py @@ -311,6 +311,10 @@ class ManifestXml(BaseXmlHelper): def get_repo_sources(self, combo_name): if combo_name in self.__combo_sources: return self._tuple_list(self.__combo_sources[combo_name]) + elif combo_name.startswith('Pin:'): + # If currently checked out onto a pin file reture the sources = in the + # default combo + return self._tuple_list(self.__combo_sources[self.general_conf= ig.default_combo]) else: raise ValueError(COMB_INVALIDINPUT_ERROR.format(combo_name)) =20 --=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 (#56777): https://edk2.groups.io/g/devel/message/56777 Mute This Topic: https://groups.io/mt/72686761/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-