From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E7437436E1; Wed, 13 Dec 2023 13:54:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E048B402ED; Wed, 13 Dec 2023 13:54:01 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id D97D24021D for ; Wed, 13 Dec 2023 13:54:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702472040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T4bGIMYnRjdFy23imCFKRYSkndAUvKHwtD/CEVgx2ao=; b=OEJ6ugKUwZAHaPt3rLg60WxYKCVjwfNvrLr8nlYux3isc5EuQnO089FHXzol2DaDBM9UCs CXlB9kFJQ439uTBC67xDQaXkuMv2bwOhNb1MOWnZBW1+gp8RLKHwOkvRVV+MKcFYTOajjS oR8bJMNeufrWUCJukF0eOytBeXea8G4= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-385-Ek3sEbVvMsGGq8FoUzGRxA-1; Wed, 13 Dec 2023 07:53:57 -0500 X-MC-Unique: Ek3sEbVvMsGGq8FoUzGRxA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C8ADD1C0512E; Wed, 13 Dec 2023 12:53:56 +0000 (UTC) Received: from RHTPC1VM0NT (unknown [10.22.32.214]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C293A51E3; Wed, 13 Dec 2023 12:53:55 +0000 (UTC) From: Aaron Conole To: zhoumin Cc: ci@dpdk.org, msantana@redhat.com, dmarchan@redhat.com, thomas@monjalon.net, probb@iol.unh.edu, dceara@redhat.com, alialnu@nvidia.com Subject: Re: [PATCH v1] tools: fix parsing message-id in the headers of email References: <20231204025246.14779-1-zhoumin@loongson.cn> <6814760d-e5b3-5d70-7fd2-58137038dd81@loongson.cn> Date: Wed, 13 Dec 2023 07:53:55 -0500 In-Reply-To: <6814760d-e5b3-5d70-7fd2-58137038dd81@loongson.cn> (zhoumin@loongson.cn's message of "Fri, 8 Dec 2023 03:53:08 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org zhoumin writes: > Hi Aaron, > > Thanks for your reply. > > On Thur, Dec 7, 2023 7:07PM, Aaron Conole wrote: >> Min Zhou writes: >> >>> Some email has the message-id header named "Message-id", like this: >>> https://patches.dpdk.org/project/dpdk/patch/20230930010024.34377-1-rdna= @apple.com/. >>> So add the parsing for this kind of email. >>> >>> Signed-off-by: Min Zhou >>> --- >> Hi Min, >> >> I wonder - we will keep having this issue of these header fields being >> incorrectly matched based on case issues. >> >> Maybe we should make getheader have the ability to ignore case, or pass >> something like Message-[iI][dD] as the header argument. >> >> WDYT? > > Yes, making getheader have the ability to ignore case is simple and > does work for this case as following: > > diff --git a/tools/parse-email.sh b/tools/parse-email.sh > index 9ab627b..1e3008a 100755 > --- a/tools/parse-email.sh > +++ b/tools/parse-email.sh > @@ -29,7 +29,7 @@ fi > > =C2=A0getheader () # > =C2=A0{ > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sed "/^$1: */!d;s///;N;s,\n[[:space= :]]\+, ,;s,\n.*,,;q" "$2" | > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sed "/^$1: */I!d;s///;N;s,\n[[:spac= e:]]\+, ,;s,\n.*,,;q" "$2" | > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sed 's,",\\",g' > > =C2=A0} > > But, I think we might get a false-positive when matching header field > by this way. Because we are handling the whole patch file which could > have same words in somewhere if we ignore the case. > > Passing Message-[iI][dD] also works for this case and I tend to use > this method. What do you think? If you agree with this method I will > send the V2 patch. ACK by me - sounds good. That means we can just modify the existing getheader check for message id. > Best regards, > > Min > > >>> tools/parse-email.sh | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/tools/parse-email.sh b/tools/parse-email.sh >>> index 9cb9583..fbe038a 100755 >>> --- a/tools/parse-email.sh >>> +++ b/tools/parse-email.sh >>> @@ -35,6 +35,7 @@ subject=3D$(getheader Subject "$1") >>> from=3D$(getheader From "$1") >>> msgid=3D$(getheader Message-Id "$1") >>> [ -n "$msgid" ] || msgid=3D$(getheader Message-ID "$1") >>> +[ -n "$msgid" ] || msgid=3D$(getheader Message-id "$1") >>> pwid=3D$(getheader X-Patchwork-Id "$1") >>> listid=3D$(getheader List-Id "$1") >>> reply=3D$(getheader In-Reply-To "$1")