From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.8408.1585952645944841982 for ; Fri, 03 Apr 2020 15:24:06 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: 91yiQ8Dgb6JSe31w8VqExnb2obmzsK7cjC3ses8uqtrAChGNYUJL8ewYnXhrAVw6inpDdmt60m V1wVQINTVbog== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2020 15:24:05 -0700 IronPort-SDR: DGE4AobYN6qzqlEwSLdNsAvZqXBuMbAj2txfnMPOO4V0h40QBS5fy3ZpI4dRYNFBKezmtQ3jDY VQ+6TSBPQarg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,341,1580803200"; d="scan'208";a="250300305" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by orsmga003.jf.intel.com with ESMTP; 03 Apr 2020 15:24:05 -0700 Received: from orsmsx115.amr.corp.intel.com (10.22.240.11) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 3 Apr 2020 15:24:05 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.205]) by ORSMSX115.amr.corp.intel.com ([169.254.4.102]) with mapi id 14.03.0439.000; Fri, 3 Apr 2020 15:24:04 -0700 From: "Nate DeSimone" To: "Desimone, Ashley E" , "devel@edk2.groups.io" CC: "Pandya, Puja" , "Bjorge, Erik C" , Bret Barkelew , "Agyeman, Prince" Subject: Re: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Allow pin file to be checked out when combo is not in project manifest Thread-Topic: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Allow pin file to be checked out when combo is not in project manifest Thread-Index: AQHWB7+rCG/QK4BUFUmRgJRbH3dhxKhn/RNw Date: Fri, 3 Apr 2020 22:24:04 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5E35902@ORSMSX114.amr.corp.intel.com> References: <20200401005118.24224-1-ashley.e.desimone@intel.com> In-Reply-To: <20200401005118.24224-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWY4MzcxM2MtYjJhYy00OTdjLTgyMTItNjQ2Nzk5YjkwMjI1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiY0FENkt4SGJpUGVJNW9yRjZES1NNMXo0ZEU3SmliMGV0N1VOYkN2RmpORVhJWmNlTUVrZFluMWRIdFJFOXNWXC8ifQ== 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/1c768b9f -----Original Message----- From: Desimone, Ashley E =20 Sent: Tuesday, March 31, 2020 5:51 PM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Pandya, Puja ; Bjorge, Erik C ; Bret Barke= lew ; Agyeman, Prince Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Allow pin file to be check= ed out when combo is not in project manifest When a pin file is based on a combo that is not in the project manifest fil= e but otherwise matches the project print a warning instead of throwing and= exception and allow the pin to be checked out. 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 | 10 ++++++++-- edkrepo/commands/humble/checkout_pin_humble.py | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/edkrepo/commands/checkout_pin_command.py b/edkrepo/commands/ch= eckout_pin_command.py index 619fcf8..72075bf 100644 --- a/edkrepo/commands/checkout_pin_command.py +++ b/edkrepo/commands/checkout_pin_command.py @@ -90,11 +90,17 @@ class CheckoutPinCommand(EdkrepoCommand): elif not set(pin.remotes).issubset(set(manifest.remotes)): raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH= ) elif pin.general_config.current_combo not in [c.name for c in mani= fest.combinations]: - raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH= ) + =20 + print(humble.COMBO_NOT_FOUND.format(pin.general_config.current_combo)) combo_name =3D pin.general_config.current_combo pin_sources =3D pin.get_repo_sources(combo_name) pin_root_remote =3D {source.root:source.remote_name for source in = pin_sources} - manifest_sources =3D manifest.get_repo_sources(combo_name) + try: + # If the pin and the project manifest have the same combo get = the + # repo sources from that combo. Otherwise get the default comb= o's + # repo sources + manifest_sources =3D manifest.get_repo_sources(combo_name) + except ValueError: + manifest_sources =3D=20 + manifest.get_repo_sources(manifest.general_config.default_combo) manifest_root_remote =3D {source.root:source.remote_name for sourc= e in manifest_sources} if set(pin_root_remote.items()).isdisjoint(set(manifest_root_remot= e.items())): raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH= ) diff --git a/edkrepo/commands/humble/checkout_pin_humble.py b/edkrepo/comma= nds/humble/checkout_pin_humble.py index ac7467d..ec6938d 100644 --- a/edkrepo/commands/humble/checkout_pin_humble.py +++ b/edkrepo/commands/humble/checkout_pin_humble.py @@ -12,4 +12,6 @@ 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)) C= OMMIT_NOT_FOUND =3D 'The commit referenced by the PIN file does not exist. = {}'.format(CHP_EXIT) -PIN_COMBO =3D 'Pin: {}' \ No newline at end of file +PIN_COMBO =3D 'Pin: {}' +COMBO_NOT_FOUND =3D ('Warning: The combo listed in PIN file: {} is no long= er ' + 'listed in the project manifest file.') \ No newline at end of file -- 2.16.2.windows.1