From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web11.8393.1585952606428666597 for ; Fri, 03 Apr 2020 15:23:26 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: 0Wz8hlIMGy48QmNAKBYGGuDi1gpBWGU7DjAmQFEBic2LwQ6JQJw23lqr2Qia1GpQ7wrB0Q5ZUv fOInkuj8GA1A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2020 15:23:25 -0700 IronPort-SDR: /KSrFPjBLaTQRQW3dKv995p9UwwWfg9WL9LzE9aM9JaftjE6kbOrwpDUo6o+H4rbUT0Dq2FFZr RY2AIkxf7ypQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,341,1580803200"; d="scan'208";a="250300203" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by orsmga003.jf.intel.com with ESMTP; 03 Apr 2020 15:23:25 -0700 Received: from orsmsx156.amr.corp.intel.com (10.22.240.22) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 3 Apr 2020 15:23:25 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.205]) by ORSMSX156.amr.corp.intel.com ([169.254.8.211]) with mapi id 14.03.0439.000; Fri, 3 Apr 2020 15:23:25 -0700 From: "Nate DeSimone" To: "devel@edk2.groups.io" , "Desimone, Ashley E" CC: "Pandya, Puja" , "Bjorge, Erik C" , Bret Barkelew , "Agyeman, Prince" Subject: Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve state tracking when checking out pin files Thread-Topic: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve state tracking when checking out pin files Thread-Index: AQHWB59trVzi9Be3BEKakBh2JGDCWqhn/Ubw Date: Fri, 3 Apr 2020 22:23:24 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5E358E1@ORSMSX114.amr.corp.intel.com> References: <20200331210023.18080-1-ashley.e.desimone@intel.com> In-Reply-To: <20200331210023.18080-1-ashley.e.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTllOGY1ZTktMDI5Zi00OTQ1LTg0YjEtMGIxYTc5ZDkzNTEzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidFREMUJGXC9Ea0JFRFBOb2RwZVk1R0pqOHB2NDljUytQejd3TmFiSlNOYU02MjAyeEtxMVVBTUZJMlwvdWJyYlNsIn0= x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Return-Path: nathaniel.l.desimone@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed: https://github.com/tianocore/edk2-staging/commit/e5d9630e -----Original Message----- From: devel@edk2.groups.io On Behalf Of Desimone, A= shley E Sent: Tuesday, March 31, 2020 2:00 PM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Pandya, Puja <= puja.pandya@intel.com>; Bjorge, Erik C ; Bret Bark= elew ; Agyeman, Prince Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve stat= e tracking when checking out pin files Improves the state tracking when checking out onto a pin file by: (1)moving the call to write_current_combo() after the succesfull check= out, (2)changing the name of the combo written to the format: 'Pin: {pinfilename}', (3)If the current combo is a knon pin file (starts w= ith 'Pin:') get_repo_sources() will return the repo sources from the defaul= t combo 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 | 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/c= heckout_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, manife= st_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.curr= ent_combo) try: checkout_repos(args.verbose, args.override, pin_repo_sources,= workspace_path, manifest) + + manifest.write_current_combo(humble.PIN_COMBO.format(args.pinfile)) finally: if sparse_enabled: print(SPARSE_CHECKOUT) diff --git a/edkrepo/commands/humble/checkout_pin_humble.py b/edkrepo/comm= ands/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 = project ' '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) \ No newline at end of file +COMMIT_NOT_FOUND =3D 'The commit referenced by the PIN file does not=20 +exist. {}'.format(CHP_EXIT) PIN_COMBO =3D 'Pin: {}' \ No newline at end of file diff --git a/edkrepo_manifest_parser/edk_manifest.py b/edkrepo_manifest_pa= rser/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=20 + self._tuple_list(self.__combo_sources[self.general_config.default_comb + o]) else: raise ValueError(COMB_INVALIDINPUT_ERROR.format(combo_name)) =20 -- 2.16.2.windows.1