unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: "Peter J. Jones" <pjones@pmade.com>, notmuch@notmuchmail.org
Subject: Re: notmuch insert: Cannot open Xapian database (0.34.1)
Date: Sat, 04 Dec 2021 15:01:39 -0400	[thread overview]
Message-ID: <878rx0ry7g.fsf@tethera.net> (raw)
In-Reply-To: <87mtlg8bow.fsf@devalot.com>

"Peter J. Jones" <pjones@pmade.com> writes:

> I can see in `notmuch.c` that the insert command doesn't have the
> `NOTMUCH_COMMAND_DATABASE_CREATE` bit set, so this is the expected
> behavior in 0.34 and was probably a bug in 0.31.  However, I would argue
> that it's useful to create the database in this situation.

I have no real objection to that happening; I'm not sure if it would
break anything. 

>
> In my tests I bootstrap a new VM with an account that has no mail yet.
> Then mail comes in via Dovecot which is handed off to `notmuch insert`,
> which fails.  On my end I can fix the test by running `notmuch new`
> before Dovecot calls `notmuch insert`.
>
> The second issue is that if the `.notmuch` directory exists, but the
> `.notmuch/xapian` directory doesn't, `notmuch new/insert` will fail:
> files first, then notmuch is run to test mail delivery and indexing.
>
> This seemed to work in 0.31 (notmuch would just create a new database).
>
> Would it be okay to change `notmuch_database_create_with_config` to
> create a new database if `.notmuch` exists but `.notmuch/xapian`
> doesn't?

There is many different options for database location possible in 0.32
that were not possible in 0.31.  It might be a bit trickier to make this
change (without compromising something else) than the previous one.

Perhaps migrating to XDG database locations (see notmuch-config(1) for
details) would be an option for you?

  reply	other threads:[~2021-12-04 19:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04 18:30 notmuch insert: Cannot open Xapian database (0.34.1) Peter J. Jones
2021-12-04 19:01 ` David Bremner [this message]
2021-12-06 17:57   ` Peter J. Jones

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=878rx0ry7g.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    --cc=pjones@pmade.com \
    /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).