"notmuch new" does not remove my file from db (double slash problem ?)

francois at avalenn.eu francois at avalenn.eu
Fri Nov 6 02:26:37 PST 2015


On Tue, Apr 14, 2015 at 04:52:29PM +0300, Tomi Ollila wrote:
> On Tue, Apr 14 2015, francois at avalenn.eu wrote:
> > I have a little problem here.
> > I have a message of which I had multiple copies and I deleted one of
> > them but "notmuch new" does not suppress this copy.
> >
> >     $ notmuch search --output=files id:20150216180408.HA14616 at myhost
> >     /home/francois/Maildir/my_first_box/cur/1424110151_0.24869.myhost,U=742:2,S
> >     /home/francois/Maildir/my_second_box/cur/1424110163_0.24869.myhost,U=14486:2,S
> >     /home/francois/Maildir/my_third_box//cur/1429004021.3224_3.myhost:2,S
> >
> > The last copy is the one I deleted.
> > I tried to readd the message to this box and after I have this status :
> >
> >     $ cp ~/Maildir/my_second_box/cur/1424110163_0.24869.myhost,U=14486:2,S ~/Maildir/my_third_box/cur
> >     $ notmuch new
> >     Processed 1 file in almost no time.
> >     No new mail.
> >     $ notmuch search --output=files id:20150216180408.HA14616 at myhost
> >     /home/francois/Maildir/my_first_box/cur/1424110151_0.24869.myhost,U=742:2,S
> >     /home/francois/Maildir/my_second_box/cur/1424110163_0.24869.myhost,U=14486:2,S
> >     /home/francois/Maildir/my_third_box/cur/1429004021.3224_3.myhost:2,S
> >     /home/francois/Maildir/my_third_box//cur/1429004021.3224_3.myhost:2,S
> >
> > And if I redelete it I come back to beginning :
> >
> >     $ rm ~/Maildir/my_third_box/cur/1429004021.3224_3.myhost:2,S
> >     $ notmuch new
> >     No new mail. Detected 1 file rename.
> >     $ notmuch search --output=files id:20150216180408.HA14616 at myhost
> >     /home/francois/Maildir/my_first_box/cur/1424110151_0.24869.myhost,U=742:2,S
> >     /home/francois/Maildir/my_second_box/cur/1424110163_0.24869.myhost,U=14486:2,S
> >     /home/francois/Maildir/my_third_box//cur/1429004021.3224_3.myhost:2,S
> >
> >
> > I don't know how the file path with double slash was added in the
> > first place to the DB but I have a real problem with it.
> >
> > Anyone have any idea of how I can solve this ?
> 
> When you remoted file from my_third_box/ directory timestamp was updated
> and notmuch new should have noticed file disappearing -- it may be that
> as it has same message id as another it somehow did not get disappeared
> from db.
> 
> what you can do is to move all of the messages to another directory,
> run notmuch new, restore (some of) the files and run notmuch new again
> (and then restore tags...)
> 
> something like this:
> 
> mkdir ~/tmp-20150414
> notmuch search --output=files id:20150216180408.HA14616 at myhost | xargs mv -T ~/tmp-20150414
> notmuch new
> mv ~/tmp-20150414/1424110151_0.24869.myhost,U=742:2,S ~/Maildir/my_first_box/cur/
> notmuch new
> 
> if you do this, report...

I finally did this and the result is still the same.

I think my last chance is to drop completely the notmuch db and
reimporting from dump.

    $ notmuch search --output=files id:20150216180408.GA24515 at myhost
    /home/francois/Maildir/another_box/cur/1446803446_0.30241.myhost,U=7096:2,S
    /home/francois/Maildir/my_second_box/cur/1446803455_0.30241.myhost,U=3407:2,S
    /home/francois/Maildir/my_first_box/cur/1446803465_0.30241.myhost,U=32711:2,S
    /home/francois/Maildir/my_third_box//cur/1429004021.3224_3.myhost:2,S
    $ notmuch search --output=files id:20150216180408.GA24515 at myhost | xargs --delimiter="\n" mv -t ~/tmp-$(date +%Y%m%d) 
    mv: impossible d'évaluer « /home/francois/Maildir/my_third_box//cur/1429004021.3224_3.myhost:2,S »: Aucun fichier ou dossier de ce type
    $ ls -ltra ~/tmp-20151106
    total 1576
    -rwxr-xr-x  1 francois francois 453137 nov.   6 10:50 1446803446_0.30241.myhost,U=7096:2,S*
    -rwxr-xr-x  1 francois francois 453137 nov.   6 10:50 1446803455_0.30241.myhost,U=3407:2,S*
    -rwxr-xr-x  1 francois francois 453137 nov.   6 10:51 1446803465_0.30241.myhost,U=32711:2,S*
    drwxr-xr-x 72 francois francois 241664 nov.   6 11:05 ../
    drwxr-xr-x  2 francois francois   4096 nov.   6 11:09 ./
    $ notmuch new
    No new mail.
    $ notmuch search --output=files id:20150216180408.GA24515 at myhost
    /home/francois/Maildir/my_third_box//cur/1429004021.3224_3.myhost:2,S
    $ mv ~/tmp-20151106/1446803465_0.30241.myhost,U=32711:2,S ~/Maildir/my_first_box/cur/
    « /home/francois/tmp-20151106/1446803465_0.30241.myhost,U=32711:2,S » -> « /home/francois/Maildir/my_first_box/cur/1446803465_0.30241.myhost,U=32711:2,S »
    « /home/francois/tmp-20151106/1446803465_0.30241.myhost,U=32711:2,S » supprimé
    $ notmuch new
    Note: Ignoring non-mail file: /home/francois/Maildir/my_first_box/cur/1444053508_2.8473.myhost,U=29286:2,S
    Processed 2 total files in almost no time.
    No new mail.
    $ ls -ltra "/home/francois/Maildir/my_first_box/cur/1444053508_2.8473.myhost,U=29286:2,S"
    -rwxr-xr-x 1 francois francois 26 oct.   5 15:58 /home/francois/Maildir/my_first_box/cur/1444053508_2.8473.myhost,U=29286:2,S*
    $ notmuch new
    No new mail.
    $ notmuch search --output=files id:20150216180408.GA24515 at myhost
    /home/francois/Maildir/my_first_box/cur/1446803465_0.30241.myhost,U=32711:2,S
    /home/francois/Maildir/my_third_box//cur/1429004021.3224_3.myhost:2,S

The "non-mail file" error is completely unrelated to my problem. It
just occured today when I redid the experiment but was not when I did
it first last week.


> >
> >     $ notmuch --version
> >     notmuch 0.18.2
> >     $  lsb_release -a
> >     No LSB modules are available.
> >     Distributor ID: Debian
> >     Description:    Debian GNU/Linux 8.0 (jessie)
> >     Release:        8.0
> >     Codename:       jessie


More information about the notmuch mailing list