From nobody Wed May 8 20:29:49 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+56804+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+56804+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1585702284; cv=none; d=zohomail.com; s=zohoarc; b=OI8dDRL29oygJO65l8vJLWvdSVmKtKgooa5psowgL3EjWGhr0icdyHd87D/w5I5BY0/5TgungpXgMMN9mo8jRDCQ1wYRXvghzTCjMPXsJZWHXrrzVGRvWtV5WDLoyfBgOAaRZYdWZIX0OSwNF1kPyHyqEO36eHJSRN0NSukuJno= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585702284; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=dqYLx1pyOmLHzS+gtVz1OfbDYFOn1OJZfmcx8AelMO4=; b=NsmZtw+mPJrV8MncNiF5/cgfGiAQVdFOWEntH+R6fV3bNhb0lzk4wKpHb86/p2PBcLRuxtcHVxdLmGWVYeLgtf6dX8Ynz97TWY3N/fKF78IMS/ip6u7KrHcNMyLh7+Y8RDlM6O8DC2Vg7ER36FuOFEtlAbI7VTRTuca+cpqWIC8= 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+56804+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 1585702284083317.89141175747625; Tue, 31 Mar 2020 17:51:24 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 4ShuYY1788612xUN3VTANtqk; Tue, 31 Mar 2020 17:51:23 -0700 X-Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.2123.1585702282618140971 for ; Tue, 31 Mar 2020 17:51:22 -0700 IronPort-SDR: 4Pa/i5BvLEtvtG3//8e/hcATR6CrrRJsC0DfA7w5LdiifIqKHQb6Yy6/2vKTjGwbaSubAGHNQ1 AA7171J9aElg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2020 17:51:22 -0700 IronPort-SDR: IL0lhznIzZIshbuClUSoZOx6o2mkH4OoIEZCMTrGAjOx3L+ZBWyvS73ZTM+BHFcVolYoegwbas tqG+2C/46KLA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,329,1580803200"; d="scan'208";a="252431568" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.7.159.171]) by orsmga006.jf.intel.com with ESMTP; 31 Mar 2020 17:51:22 -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: Allow pin file to be checked out when combo is not in project manifest Date: Tue, 31 Mar 2020 17:51:18 -0700 Message-Id: <20200401005118.24224-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: 3SbeCJyRTI5L4JZ02xVgL0sqx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1585702283; bh=69J5kVQRkTAh/HFlZPytEiVYjKud2K1+FAwHXXEBGfE=; h=Cc:Date:From:Reply-To:Subject:To; b=hLfJRWrmXSnklQuhUFv2+IZXorgU7aMcoedYx2cxMHmhdvuwE22XiZgJLB/7qhTFh2m lWsbqWgkIGFWk/xUi8lg2tpCCzAfKMotpnRF3hzLVV2UzagGUi3yFaF1aTX2NQi95zG8Z j1oh8/2dJ7qmv7lqcXMb3g8oka1ZP8FxuuY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" When a pin file is based on a combo that is not in the project manifest file 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 Reviewed-by: Nate DeSimone --- 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) + 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 manifest.get_repo_sources(manifest.genera= l_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)) 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 +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 --=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 (#56804): https://edk2.groups.io/g/devel/message/56804 Mute This Topic: https://groups.io/mt/72690981/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-