From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.92.1585695425860643652 for ; Tue, 31 Mar 2020 15:57:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=RbI4fE24; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: erik.c.bjorge@intel.com) IronPort-SDR: 295IaZ842SDwCbbZ+oOWXlgeBXCUMq4N0pxlMrZxkwT7sQXkLabBkQIRK9lC6gasBdn35Oq8MA HOo3hZl+2TDA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2020 15:57:05 -0700 IronPort-SDR: XCrn2eswKKVekZjNIYoS1U/CrQ09UfaOeJ26xaUiEvpL+jYxhFBdJv208xA9c42JiuyVEAHKv9 skUQ9kpz2Tig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,329,1580803200"; d="scan'208";a="252405036" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by orsmga006.jf.intel.com with ESMTP; 31 Mar 2020 15:57:05 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 31 Mar 2020 15:57:04 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 31 Mar 2020 15:57:04 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 31 Mar 2020 15:57:04 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.45) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 31 Mar 2020 15:57:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jn+yL2zQDSPRIEt72Q64H7Ddi31IKc8uqBG6DEOimjO6myUaLXhz21ysCtdW52Cb7qurYxMmQlctjw1Q13jFB4iswdQOLFyXtwkOiy0juTqmCWoAuK9jTpPDuLwBO9eE+sElSFQ7EH7AJilyGJpC38E4dvBXjBlCW0NoE7TQBBdEXfq4x8YkYZi4/0vBRtjEy3hYmoSYhZRdybVIf+5zW/dthX+pqk5hy19cypgzsqjaxYn85RHMw8Kk+0XqjTz2BhefZxOSDRPNZPzja2jX6joVud8UyG5vcaNBNtShULq+vttugBDjAfG/DtNm/OI7f5EO/ISww9pjmla1BGS/og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=px5DB4s4YNFxWYgotCazAMLkEkk+Rg6Z3FgPclO933o=; b=elQ1XBoJXpdIinDNo3VY+7LFRgibWuj2VkYwf3TBK/IXp+nktcU60qWW5fPoikK5vqp6djOQm74e3XxcEwKJRTgWcLI8reeFExLHitFSFRZVsLF3iTzOBnDzIdBt7o7ZunNnBoj61n+TuNIYvtT3l1WcdYf9l2SWMlAoCVh7ZCkCwzfaDON/z3EkSWRTwFQAzn1xmj2HvAW4m25ccwWIWBZi1vt0A+koGfBofsPoA01MfyzyaHvH44eZQ7dbN1q7T2aC2rkpia2VnixPXaRMTU6WZQp4SGHusscRQsSB+tVzQtnpdT0XlXpaS6kmSFRaKT0OTQosU7c/45QlfAhRsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=px5DB4s4YNFxWYgotCazAMLkEkk+Rg6Z3FgPclO933o=; b=RbI4fE24v+mjC/InKCjSUAJMrbiBPwhauUCjvPL+caBtNr3BZxaIO/yeub7ETpxs/TK4vDZizAO6iL0LtaQ4873Qwp0edeKD92Fp4BwbpoqVveU/2HS6KzeADvydE2V8XYWSDbcaVaxKTMHXRb82cBFJWQ4NrA7x679TQgPunjA= Received: from MW3PR11MB4571.namprd11.prod.outlook.com (2603:10b6:303:59::19) by MW3PR11MB4747.namprd11.prod.outlook.com (2603:10b6:303:2f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.19; Tue, 31 Mar 2020 22:56:59 +0000 Received: from MW3PR11MB4571.namprd11.prod.outlook.com ([fe80::203d:5262:5932:e207]) by MW3PR11MB4571.namprd11.prod.outlook.com ([fe80::203d:5262:5932:e207%5]) with mapi id 15.20.2856.019; Tue, 31 Mar 2020 22:56:58 +0000 From: "Bjorge, Erik C" To: "devel@edk2.groups.io" , "Desimone, Ashley E" CC: "Desimone, Nathaniel L" , "Pandya, Puja" , 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: AQHWB5+J7nxzZYN9NEeYAvziyHSFLKhjUBAA Date: Tue, 31 Mar 2020 22:56:58 +0000 Message-ID: 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-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows authentication-results: spf=none (sender IP is ) smtp.mailfrom=erik.c.bjorge@intel.com; x-originating-ip: [192.55.52.199] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d308bece-9238-4f6d-6cf0-08d7d5c6d169 x-ms-traffictypediagnostic: MW3PR11MB4747: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1107; x-forefront-prvs: 0359162B6D x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW3PR11MB4571.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(376002)(346002)(396003)(39860400002)(366004)(136003)(64756008)(110136005)(7696005)(66556008)(33656002)(107886003)(66446008)(9686003)(316002)(71200400001)(478600001)(55016002)(54906003)(4326008)(81156014)(6506007)(8936002)(76116006)(26005)(52536014)(8676002)(53546011)(6636002)(66476007)(966005)(86362001)(81166006)(5660300002)(2906002)(186003)(66946007);DIR:OUT;SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Rt3G4473S81UcAZGb1D7u/FfzxXqOQ0UN5SrsAOeR8Jxy6u7m1b1A9w+xvh3IkSddBFN7JSarW4U6zqx/jX4AcJfsHZD+XRth6FwmBYcsm8WGWqU3E05MCWMiVMGvQWzgjjlH8u1mq3RN8B1aSzCYIoxJATurmRq55DUR0CFpsVVt1zVp+DQqnnOqoDc+Fq8NsGVc3p9hx5mQ9BZpsT8YlqagRWAQMSX+yaHt78GUKgpDMxyOB9GKDDOSjIBus5jlrFFE5/vLrOUF0VENfzcsp2IFPN2TLmMq4k+JduXrjHTssBx2gOlOsxhjTAPpQWOanbXTxDx4/vNcGVdLpZjsKg2LSrqiJ4R4Xl3ZoekxanFyxPoqxPSQO5GfLKts4gq5K2dxROCcFJfLcVsHrz4u5qsLXhWDTvV47YziUmR3MvQ5GjHpLVd5o9H+3+vG8aJmoOCI9cuuw9gjbbYleSMYaIBUpv88AmGyYvgv9l8V8ym+x9kNNwWGFXcLdJxB15QKhu5X4pZv7koyPQ+wLgx2Q== x-ms-exchange-antispam-messagedata: vDlynU3NDmfxjwJloakqiEOFJAeNBxvCfzaWNXYVIkmXchmJSrCtJyFJ+JobwrNFto73wCnbEtOaY81dJfdwCm/F3h9jm5uYqDA9tqDAgY5/d+sut2355DF43XKoiWUpbmA6VEVljC5g00sBGS+U6A== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: d308bece-9238-4f6d-6cf0-08d7d5c6d169 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Mar 2020 22:56:58.9394 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DTBFndTpzF+YXON2aEUK4lzRQ+wXB1iftrUxiW6icd/uhzoxkgRFehapI85chmPehzJrcsO8wABUX8miLscMWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4747 Return-Path: erik.c.bjorge@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Erik Bjorge -----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