unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Eric Blake <eblake@redhat.com>, notmuch@notmuchmail.org
Subject: Re: notmuch breaks on \. in config file with upgrade from glib2 2.76.1 to 2.76.5
Date: Sat, 09 Sep 2023 21:37:26 -0300	[thread overview]
Message-ID: <87zg1uamnt.fsf@tethera.net> (raw)
In-Reply-To: <5a7paaqa2dvdo5lmnxvaeacfwhdytfnkr4gfh6mtlotdviki2s@ro4gz4m2aqsw>

Eric Blake <eblake@redhat.com> writes:
> $ tail -n3 .notmuch-config
> [query]
> q1=from:/.*\\.example\\.org/
> q2=from:"/.*\.example\.org/"

> glib2-2.76.5-1.fc38.x86_64
> glib2-2.76.5-1.fc38.i686
> $ notmuch --config=$PWD/.notmuch-config config list
> $ echo $?
> 0
> $ notmuch --config=$PWD/.notmuch-config count
> $ echo $?
> 1

I could not duplicate the glib issue with glib 2.77.2 on Debian.
Looking at the source, it looks like we don't have 71b7efd08a1fe
(or equivalent).

╰─ (git)-[release]-% tail -3 bad-config
[query]
q1=from:/.*\\.example\\.org/
q2=from:"/.*\.example\.org/"
╭─ motzkin:upstream/notmuch/test/tmp.T030-config
╰─ (git)-[release]-% ../../notmuch --config=./bad-config count
52
╭─ motzkin:upstream/notmuch/test/tmp.T030-config
╰─ (git)-[release]-% echo $?
0

I usually like to start with a failing test, but it seems that may not
be possible here, since the actual failure only happens with specific
versions of glib.

From the discussion surrounding the revert / fix, it seems like the
behaviour of setting the GError, but also returning a string is itself
an error and can be expected to change. The assumption in the notmuch
code [1] is also that the status string only needs to be checked
on non-success status code. It should be OK to check the string anyway, but I
guess there might be some bugs uncovered.



[1]: notmuch.c, around line 547\r

  parent reply	other threads:[~2023-09-10  0:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 12:49 notmuch breaks on \. in config file with upgrade from glib2 2.76.1 to 2.76.5 Eric Blake
2023-09-06 14:37 ` Michael J Gruber
2023-09-06 15:42   ` Eric Blake
2023-09-06 15:26 ` [PATCH] config: Inform user if config file is broken Eric Blake
2023-09-06 15:48   ` David Bremner
2023-09-06 16:11     ` Eric Blake
2023-09-10  0:37 ` David Bremner [this message]
2023-09-10 11:58   ` notmuch breaks on \. in config file with upgrade from glib2 2.76.1 to 2.76.5 David Bremner
2023-09-11 15:06     ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zg1uamnt.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=eblake@redhat.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).