Re: notmuch insert: Cannot open Xapian database (0.34.1)

Subject: Re: notmuch insert: Cannot open Xapian database (0.34.1)

Date: Mon, 06 Dec 2021 10:57:11 -0700

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Peter J. Jones


On Sat, Dec 04 2021, David Bremner wrote:
> "Peter J. Jones" <pjones@pmade.com> writes:
>>
>> 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?

Thanks for the pointer.  I was able to resolve this issue by moving my
hook scripts out of `database.path` thanks to `database.hook_dir`.

-- 
Peter Jones

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: