Breakage after updating to 0.32 (database and path issues)

Subject: Breakage after updating to 0.32 (database and path issues)

Date: Sun, 09 May 2021 07:58:33 -0700

To: notmuch@notmuchmail.org

Cc:

From: Jack Kamm


Updating to 0.32 broke my notmuch setup. notmuch could no longer find my
database; after I changed some paths in my config, notmuch appeared to
be able to find the database again, but wound up rebuilding it anyways,
and could no longer find any of my emails.

Any advice on fixing my setup would be appreciated. Also, I would
suggest adding information to the v0.32 release notes of any breaking
changes that were made, and how to migrate existing setups.

I'm on Archlinux, and my email is located in $HOME/mail, with each of my
accounts located under a different subfolder (e.g. $HOME/mail/gmail,
$HOME/mail/work, etc).

Below are details of the problems I ran into after updating to 0.32:

First, notmuch could no longer find my database at $HOME/mail/.notmuch:

> $ notmuch new
> Error: Cannot open database at /home/jack/.local/share/notmuch/default: No such file or directory.

According to the manpage of notmuch-config, I should be able to fix
this by unsetting database.mail_root and leaving database.path to
$HOME/mail:

> database.path
>        Notmuch will store its database here,  (in  sub-directory  named
>        .notmuch if database.mail_root is unset).
>
>        Default: $MAILDIR variable if set, otherwise $HOME/mail.
>
> database.mail_root
>        The top-level directory where your mail currently exists and to where mail will be delivered in the future. Files should be individual email messages.
> 
>        History: this configuration value was introduced in notmuch 0.32.
> 
>        Default: For compatibility with older configurations, the value of database.path is used if database.mail_root is unset.

But contrary to the manpage this didn't fix the problem:

> $ notmuch config set database.mail_root ""
> $ notmuch new                                                                                                                                              
> Error: Cannot open database at /home/jack/.local/share/notmuch/default: No such file or directory.

At this point I manually set database.path, but I got a new error this time:

> $ notmuch config set database.path $HOME/mail/.notmuch
> $ notmuch new                                                         
> Warning: failed to open directory : No such file or directory                 
> Found 0 total files (that's not much mail).                                 
> Error reading directory : No such file or directory                         
> No new mail.                                                                         
> Note: A fatal error was encountered: Something went wrong trying to read or write a file

Then I removed the setting for database.mail_root in my
.notmuch-config, at which point "notmuch new" was able to
run. However, it seems to have decided to rebuild the whole database,
and now notmuch-show is not finding any emails.

> notmuch new                                                                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/flintlock                                                                                                   
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/iamchert                                                                                                    
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/position.DB                                                                                                 
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/postlist.DB                                                                                                 
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/record.DB                                                                                                   
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/termlist.DB                                                                                                 
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/postlist.baseB                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/position.baseA                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/termlist.baseB                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/record.baseB                                                                                                
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/postlist.baseA                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/position.baseB                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/termlist.baseA                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/record.baseA                                                                                                
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/dump-20180526T233634.gz                                                                                            
> Processed 15 total files in 18m 24s (0 files/sec.).                                                                                                                       
> No new mail. Removed 884086 messages. Detected 12226 file renames.

I'm also quite concerned about the "Removed 884086 messages." I'm
guessing it only removed entries from the database, and doesn't seem to
have deleted any files. But I need to double check my afew filters and
mbsync configuration, to make sure no deletions propagate back to my
remote. In the meantime I'm refraining from running mbsync/notmuch until
I can verify that nothing will get deleted.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: