From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.6924.1585799397328496489 for ; Wed, 01 Apr 2020 20:49:57 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: 8zhNn7u/f8LiSFaMiM9TrZhoCIulzeiQEuhDnuC2yvRVCyf+h37GhwpaZzi2jY8Eh5ZH/Npq+8 Z1K4z+J2eJ+g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2020 20:49:57 -0700 IronPort-SDR: m8tjhABkjtbsrdMdZPY6OyNcgPjD9Pl54M1MNUWcsM0GxzVfr7NphAgXQbOUsGwUF2bAnuWg6I L9iFncuoNmfA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,334,1580803200"; d="scan'208";a="450787068" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by fmsmga006.fm.intel.com with ESMTP; 01 Apr 2020 20:49:55 -0700 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 1 Apr 2020 20:49:38 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.205]) by ORSMSX111.amr.corp.intel.com ([169.254.12.226]) with mapi id 14.03.0439.000; Wed, 1 Apr 2020 20:49:38 -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: AQHWB59trVzi9Be3BEKakBh2JGDCWqhlM/BQ Date: Thu, 2 Apr 2020 03:49:37 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5E304EA@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTYwZDJiOGMtMzE0Zi00MGU2LWJjZWItNjQzZjEyYWY4MmRmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiK0NhN0RSR1wvYzFcL2daUXc1UWlzVlwvVVwvOUJuNVZOb0F2Sk45VHFuNm8wSW5sajBqMmhXQ0VCcDM3ZkRpNXlvMjcifQ== 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 Reviewed-by: Nate DeSimone -----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