[notmuch] Bug with commit 2e96464f9705be4ec772280cad71a6c9d5831e6f
racin at free.fr
racin at free.fr
Fri Jan 15 17:42:39 PST 2010
I still confirm the bug.
The problem is due to relying on non-standardized fields of directory entries (i.e. d_type), which don't behave the
same on reiserfs than on ext2 (I use reiserfs).
The following ugly patch "solves" my problem.
diff --git a/notmuch-new.c b/notmuch-new.c
index b740ee2..42d9f89 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -359,7 +359,7 @@ add_files_recursive (notmuch_database_t *notmuch,
if (! S_ISREG (st.st_mode))
continue;
- } else if (entry->d_type != DT_REG) {
+ } else if (entry->d_type != DT_REG && entry->d_type != 0) {
continue;
}
With this patch, mails are added by the database, but some directories also have d_type set to 0
and can slip through.
It seems that the only portable way to test for directory types is stat, which is expensive... I don't known
what's the best way to go.
Matthieu
----- Mail Original -----
De: "Ali Polatel" <alip at exherbo.org>
À: notmuch at notmuchmail.org
Envoyé: Mercredi 13 Janvier 2010 11h21:52 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
Objet: Re: [notmuch] Bug with commit 2e96464f9705be4ec772280cad71a6c9d5831e6f
Ali Polatel yazmış:
> racin at free.fr yazmış:
> > Hello,
> >
> > I just updated notmuch and now notmuch new cannot update my mail anymore... It tells me that there are
> > 700 files found, but tells that there's no new mail.
> >
> > I did a git bisect, which tells me the first bad commit is commit 2e96464f9705be4ec772280cad71a6c9d5831e6f.
> >
> > I did not try to use the new xapian database or to update xapian; maybe this is the problem.
> >
> > I tested with several tools to get mail in the maildir format, including mb2md and getmail, and I always get the problem.
> Same problem here, I tried upgrading xapian to xapian-core-1.1.3_svn13824, the problem persists.
> Here's what happens here:
> 3074 alip at harikalardiyari> rm -fr .maildir/.notmuch
> 3075 alip at harikalardiyari> notmuch new
> Found 210302 total files (that's not much mail).
> No new mail.
> 3076 alip at harikalardiyari> notmuch search from:alip at exherbo.org
> 3077 alip at harikalardiyari>
>
After doing git bisect which gave random results and testing notmuch
using cworth's notmuch-test script on another file system I figured out
my problem was due to file system corruption.
Sorry for the noise...
--
Regards,
Ali Polatel
_______________________________________________
notmuch mailing list
notmuch at notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 1076 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100116/d48d2190/attachment-0001.obj>
More information about the notmuch
mailing list