From nobody Sun May 5 16:03:45 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+61988+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+61988+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1593704379; cv=none; d=zohomail.com; s=zohoarc; b=K2wUggUWdmVDU87qWIQeqJcCKy9nRJ0vJRpx7E4vqg5lNvaLv4MC1Jr9wUo+SoSI589IElEIpOqQEIW4OZllLaEWZm/At6Y1ZCrT7V/jY9QDVt7f/IeK7rv6lJPj5g12+e8vI6gAz8iim35Pn1wotF+qu7qeEW2Fmhg0gdFz1OQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593704379; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=vJmM5UyzNMANTaGLtrHpGubjaaRErc2TFWcgn5Ps+Gk=; b=EDDMAVF2frwKmO8Y/zNvLiOOnE+m7d4GGDkvDJgyEAJHUULnuZxbFnn/WIMb/7YPaAg0iJcst7zWuOVy2Sg1JjQFnw3y8dLxm3GHXSp/tkCooaWnagzcKsycyTHO7t6lYMiv0oBwT3dyeBsg92e+S+vx4+m2Umlm3N0FPao5jVw= 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+61988+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1593704379342381.13095279464005; Thu, 2 Jul 2020 08:39:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 4sA2YY1788612xc4BKrpm6vb; Thu, 02 Jul 2020 08:39:39 -0700 X-Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.groups.io with SMTP id smtpd.web12.9619.1593704378107177763 for ; Thu, 02 Jul 2020 08:39:38 -0700 X-Received: by mail-wr1-f68.google.com with SMTP id f18so21004248wrs.0 for ; Thu, 02 Jul 2020 08:39:37 -0700 (PDT) X-Gm-Message-State: FDRAP1lkJr6fPAVurJePxIoWx1787277AA= X-Google-Smtp-Source: ABdhPJzBXqJVpJcsXA5mCna0HEEiC0c0+gW0zwuuyH6vYoEJGSxrSIcaqpdgML/+AClvKPmj4MssSQ== X-Received: by 2002:a05:6000:111:: with SMTP id o17mr34050507wrx.178.1593704376304; Thu, 02 Jul 2020 08:39:36 -0700 (PDT) X-Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id e5sm11540205wrs.33.2020.07.02.08.39.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 08:39:35 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao Subject: [edk2-devel] [PATCH 1/2] BaseTools/PatchCheck.py: add exception for diff orderfile Date: Thu, 2 Jul 2020 16:39:33 +0100 Message-Id: <20200702153934.25262-2-leif@nuviainc.com> In-Reply-To: <20200702153934.25262-1-leif@nuviainc.com> References: <20200702153934.25262-1-leif@nuviainc.com> MIME-Version: 1.0 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,leif@nuviainc.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593704379; bh=2zgg4plwSC3wwvsJ39QA7mTgXWlQ+j5ZJ+0SylRbxsY=; h=Cc:Date:From:Reply-To:Subject:To; b=rfxmTFFbx5x84SPnOCT0/J/rQC5XUmg/+0qBpp+evgtYYeq7F+TR3QoQ20VG7YB7nPw 709rQVtDzGsGjMyvFFFYTocBN+j1HbbBFZqQINT6yvFDI2Mq7uKGc22ThGowlgJ9SSZyB ajoRhuzmiyQ8/IM44oEvzzkO7HEQWbsSMBQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" SetupGit.py adds BaseTools/Conf/diff.order as a diff orderfile, but that file currently has CRLF line endings, which causes all pattern matches to fail and the ordering remaining unaffected. Add an exception to PatchCheck.py (to the existing .gitmodules clause), so that we can merge the fix to the config file. Cc: Bob Feng Cc: Liming Gao Signed-off-by: Leif Lindholm Reviewed-by: Bob Feng --- BaseTools/Scripts/PatchCheck.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck= .py index e38cf61f93da..527761986d4c 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -395,11 +395,12 @@ class GitDiffCheck: # they are identified by their path. # self.force_crlf =3D False - if self.filename =3D=3D '.gitmodules': + if self.filename =3D=3D '.gitmodules' or \ + self.filename =3D=3D 'BaseTools/Conf/diff.order': # - # .gitmodules is updated by git and uses tabs and LF l= ine - # endings. Do not enforce no tabs and do not enforce - # CR/LF line endings. + # .gitmodules and diff orderfiles are used internally = by git + # use tabs and LF line endings. Do not enforce no tab= s and + # do not enforce CR/LF line endings. # self.force_crlf =3D False self.force_notabs =3D False --=20 2.20.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 (#61988): https://edk2.groups.io/g/devel/message/61988 Mute This Topic: https://groups.io/mt/75260900/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- From nobody Sun May 5 16:03:45 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+61989+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+61989+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1593704379; cv=none; d=zohomail.com; s=zohoarc; b=dbEb/I09N87sqxdUUKuzNYBwrN8dSE1qzTpw1UKtFgkPP39H5tGu4PBtJ1O2YPDSk+4t2akqsJ+/L2Rk+tNt1gy3MxkZ89qM/IBN7NUJES7EBBFkYr7Fcmfe5tnjHPF1xk52nmuIASyfFGfRcc9RzjPLnQSurK8M9vIZdbua+aE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593704379; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Wy/YMYouzarKlmDkLPiDJ33VdfynBVQvx5p4UsEJLTk=; b=XhfM3keaUAU0PSUkLORNJQLozEir99YYaz9fTPWZiCMWWXQPXF+wQFz/GfKKKcmMIZsECfJ8xcWOUpu52uLXNrd+nT2o+UisY8dk4fX9M1Fv9otPgyflfzid7U5H3LYOWO2HHIvbxWJDuQwjK8RWxjpB8cdRJQEYnGYCGlQnRHA= 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+61989+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1593704379904883.5171445536035; Thu, 2 Jul 2020 08:39:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 65C0YY1788612xPyUx3ob9A7; Thu, 02 Jul 2020 08:39:39 -0700 X-Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.groups.io with SMTP id smtpd.web11.9651.1593704378781522468 for ; Thu, 02 Jul 2020 08:39:39 -0700 X-Received: by mail-wr1-f41.google.com with SMTP id z15so17791653wrl.8 for ; Thu, 02 Jul 2020 08:39:38 -0700 (PDT) X-Gm-Message-State: OflPNRkG0WcN7Q0JLOhvZcbTx1787277AA= X-Google-Smtp-Source: ABdhPJw0RsBQlpMWwBE45ohRx60y9V5x5uW3g0de2TLcoL1efynXPXj2IpDB32jiNnIIjUKeK507cQ== X-Received: by 2002:a5d:4051:: with SMTP id w17mr30766799wrp.183.1593704377080; Thu, 02 Jul 2020 08:39:37 -0700 (PDT) X-Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id e5sm11540205wrs.33.2020.07.02.08.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 08:39:36 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao Subject: [edk2-devel] [PATCH 2/2] BaseTools: explicitly import email.header PatchCheck.py Date: Thu, 2 Jul 2020 16:39:34 +0100 Message-Id: <20200702153934.25262-3-leif@nuviainc.com> In-Reply-To: <20200702153934.25262-1-leif@nuviainc.com> References: <20200702153934.25262-1-leif@nuviainc.com> MIME-Version: 1.0 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,leif@nuviainc.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593704379; bh=n+5cfNTLLiCKduCRT7ejeYBB4AMnY5o73TWlUGEB7Iw=; h=Cc:Date:From:Reply-To:Subject:To; b=tQn2Fg8TzGTnlvT+sgK3SJxTUcRbGTav4TLSZDa9uMpP42z5I9/RfdUMTRc7kl9YhQ9 qKG65wET6Ut+72K6HwTLSyefzbzHvep2HSAMGy8DgueDrX25v+LyGe+iWyLTcI++ZTl2X HQaCce74nhYJ9eobQEj046qzmBPxxiN4RJU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" On Debian 10 (Buster), when running PatchCheck.py with python2, a backtrace is printed, starting from: File "../edk2/BaseTools/Scripts/PatchCheck.py", line 595, in find_patch_pieces parts =3D email.header.decode_header(pmail.get('subject')) AttributeError: 'module' object has no attribute 'header' When using python3, this backtrace does not appear. Explicitly importing email.header resolves this for python2 and does not appear to cause any issues with python3. Cc: Bob Feng Cc: Liming Gao Signed-off-by: Leif Lindholm Reviewed-by: Bob Feng --- BaseTools/Scripts/PatchCheck.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck= .py index 527761986d4c..52244b0bc4d8 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -20,6 +20,8 @@ import re import subprocess import sys =20 +import email.header + class Verbose: SILENT, ONELINE, NORMAL =3D range(3) level =3D NORMAL --=20 2.20.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 (#61989): https://edk2.groups.io/g/devel/message/61989 Mute This Topic: https://groups.io/mt/75260901/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-