From: Jani Nikula Date: Mon, 11 Nov 2013 16:01:14 +0000 (+0200) Subject: Re: fix for failing tests with gmime 2.6.19 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=16393560dcb38f272c55df7fb65599b94ba1e5bd;p=notmuch-archives.git Re: fix for failing tests with gmime 2.6.19 --- diff --git a/5a/8ecf61d8575e2c86d1d9e7dae3f7caf82c9935 b/5a/8ecf61d8575e2c86d1d9e7dae3f7caf82c9935 new file mode 100644 index 000000000..ce5e4678a --- /dev/null +++ b/5a/8ecf61d8575e2c86d1d9e7dae3f7caf82c9935 @@ -0,0 +1,227 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id A47F6431FD4 + for ; Mon, 11 Nov 2013 08:08:11 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.699 +X-Spam-Level: +X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 + tests=[HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id PQC+VUCHHRJK for ; + Mon, 11 Nov 2013 08:08:02 -0800 (PST) +Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com + [209.85.128.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 75945431FD2 + for ; Mon, 11 Nov 2013 08:08:02 -0800 (PST) +Received: by mail-ve0-f175.google.com with SMTP id jw12so2778149veb.34 + for ; Mon, 11 Nov 2013 08:08:01 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:mime-version:in-reply-to:references:date + :message-id:subject:from:to:cc:content-type; + bh=+X9VNmBbbKr4ewAD6phXl5773i1d3SZdR4IoNVgSMXY=; + b=mbcnn7OABkCyXq3raJpSmBoJXMddR9rbsSRdn4vxXaGErTMEPgc4nYkOoq9GVfqcpT + ZAtWboL5Iq9r8GDrvKKjzAQXjxMOivk2OjcpK1mAnPi93a7AgvxN2xBYKe4Y8LWAWOka + 6dGHuOu58jb1ikrOJUEEpcrlKDUSoxd2s7m+jiM44HCGReD7u06ouky/qC4wRYi70bMg + YsmnQFmG6HYFP+z2cUrrBc+d+rOGBhsBmK3EM4o7VXaiOdWI7QODmxrPgBU0BW2iHZkh + ePIFQUzeyX5gjnSbkxaVt6Tau7FW/Vy9fK4RDQGupCaDfrQy1Q3dp1kCaakOfBS3d8G0 + W9fg== +X-Gm-Message-State: + ALoCoQnAlyVi0b6C+HAFOVY6ELH4AWooS7tr3tetFKZxZQQcGx4V/BXQGzW+8+oNbv9oLcVgu2Ul +MIME-Version: 1.0 +X-Received: by 10.58.67.168 with SMTP id o8mr4627136vet.22.1384185674376; Mon, + 11 Nov 2013 08:01:14 -0800 (PST) +Received: by 10.58.96.20 with HTTP; Mon, 11 Nov 2013 08:01:14 -0800 (PST) +Received: by 10.58.96.20 with HTTP; Mon, 11 Nov 2013 08:01:14 -0800 (PST) +In-Reply-To: +References: <1384100482-15453-1-git-send-email-david@tethera.net> + <52805350.70004@fifthhorseman.net> <87iovzywua.fsf@zancas.localnet> + +Date: Mon, 11 Nov 2013 18:01:14 +0200 +Message-ID: + +Subject: Re: fix for failing tests with gmime 2.6.19 +From: Jani Nikula +To: Tomi Ollila +Content-Type: multipart/alternative; boundary=047d7b33d0f46cc3ad04eae8d729 +Cc: Notmuch Mail , + Daniel Kahn Gillmor +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 11 Nov 2013 16:08:11 -0000 + +--047d7b33d0f46cc3ad04eae8d729 +Content-Type: text/plain; charset=UTF-8 + +Gmime doesn't do anything standards incompliant, so I'd prefer patching the +test suite. Which is also why I'd like to work around this in notmuch. +On Nov 11, 2013 4:59 PM, "Tomi Ollila" wrote: + +> On Mon, Nov 11 2013, David Bremner wrote: +> +> > Daniel Kahn Gillmor writes: +> > +> >> +> >> Please don't introduce this cruft into the notmuch codebase. It should +> >> be fixed in gmime, not worked-around notmuch. +> >> +> >> I've just uploaded gmime 2.6.19-2 to unstable to address this issue. +> >> +> > +> > Hi Daniel; +> > +> > Thanks a lot for that. +> > +> > What I (still) wonder about is all the people not running Debian, in the +> > interval between the release of notmuch 0.17 and the next upstream +> > release of gmime (and propagation to various distros). Even on Debian, +> > building on testing and backports complicates things a bit. +> +> Something like this could also be used... +> +> diff --git a/notmuch-reply.c b/notmuch-reply.c +> index 9d6f843..2ab0f6e 100644 +> --- a/notmuch-reply.c +> +++ b/notmuch-reply.c +> @@ -26,6 +26,7 @@ +> static void +> show_reply_headers (GMimeMessage *message) +> { +> +#if ! GMIME_CHECK_VERSION(2,6,19) +> GMimeStream *stream_stdout = NULL; +> +> stream_stdout = g_mime_stream_file_new (stdout); +> @@ -35,6 +36,17 @@ show_reply_headers (GMimeMessage *message) +> g_mime_object_write_to_stream (GMIME_OBJECT(message), +> stream_stdout); +> g_object_unref(stream_stdout); +> } +> +#else +> + char * msg = g_mime_object_to_string (GMIME_OBJECT(message)); +> + char * rp = strstr (msg, "References: "); +> + if (rp) { +> + fwrite (msg, 1, rp - msg + 12, stdout); // Up to 'References: ' +> + fputs (rp + 13, stdout); +> + } +> + else { +> + fputs (msg, stdout); +> + } +> +#endif +> } +> +> static void +> +> +> > +> > d +> +> Tomi +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch +> + +--047d7b33d0f46cc3ad04eae8d729 +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +

Gmime doesn't do anything standards incompliant, so I= +9;d prefer patching the test suite. Which is also why I'd like to work = +around this in notmuch.

+
On Nov 11, 2013 4:59 PM, "Tomi Ollila"= + <tomi.ollila@iki.fi> wrote= +:
+On Mon, Nov 11 2013, David Bremner <david@tethera.net> wrote:
+
+> Daniel Kahn Gillmor <dkg@f= +ifthhorseman.net> writes:
+>
+>>
+>> Please don't introduce this cruft into the notmuch codebase. = +=C2=A0It should
+>> be fixed in gmime, not worked-around notmuch.
+>>
+>> I've just uploaded gmime 2.6.19-2 to unstable to address this = +issue.
+>>
+>
+> Hi Daniel;
+>
+> Thanks a lot for that.
+>
+> What I (still) wonder about is all the people not running Debian, in t= +he
+> interval between the release of notmuch 0.17 and the next upstream
+> release of gmime (and propagation to various distros). =C2=A0Even on D= +ebian,
+> building on testing and backports complicates things a bit.
+
+Something like this could also be used...
+
+diff --git a/notmuch-reply.c b/notmuch-reply.c
+index 9d6f843..2ab0f6e 100644
+--- a/notmuch-reply.c
++++ b/notmuch-reply.c
+@@ -26,6 +26,7 @@
+=C2=A0static void
+=C2=A0show_reply_headers (GMimeMessage *message)
+=C2=A0{
++#if ! GMIME_CHECK_VERSION(2,6,19)
+=C2=A0 =C2=A0 =C2=A0GMimeStream *stream_stdout =3D NULL;
+
+=C2=A0 =C2=A0 =C2=A0stream_stdout =3D g_mime_stream_file_new (stdout);
+@@ -35,6 +36,17 @@ show_reply_headers (GMimeMessage *message)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 g_mime_object_write_to_stream (GMIME_OBJECT(mes= +sage), stream_stdout);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 g_object_unref(stream_stdout);
+=C2=A0 =C2=A0 =C2=A0}
++#else
++ =C2=A0 =C2=A0char * msg =3D g_mime_object_to_string (GMIME_OBJECT(message= +));
++ =C2=A0 =C2=A0char * rp =3D strstr (msg, "References: =C2=A0");<= +br> ++ =C2=A0 =C2=A0if (rp) {
++ =C2=A0 =C2=A0 =C2=A0 fwrite (msg, 1, rp - msg + 12, stdout); // Up to = +9;References: '
++ =C2=A0 =C2=A0 =C2=A0 fputs (rp + 13, stdout);
++ =C2=A0 =C2=A0}
++ =C2=A0 =C2=A0else {
++ =C2=A0 =C2=A0 =C2=A0 fputs (msg, stdout);
++ =C2=A0 =C2=A0}
++#endif
+=C2=A0}
+
+=C2=A0static void
+
+
+>
+> d
+
+Tomi
+_______________________________________________
+notmuch mailing list
+notmuch@notmuchmail.org
+http://notmuchmail.org/mailman/listinfo/notmuch
+
+ +--047d7b33d0f46cc3ad04eae8d729--