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

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

Date: Tue, 14 Apr 2015 16:52:29 +0300

To: francois@avalenn.eu, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Tue, Apr 14 2015, francois@avalenn.eu wrote:

> Hello list,
>
> 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@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@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@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@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'll mark this message with notmuch::bug in nmbug (in near future...)

Tomi


>
>     $ 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
>     
>
>
>
> F.
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

Thread: