On Thu, 15 Mar 2007, Han Boetes wrote:

> Otto Moerbeek wrote:
> > The problem is here that the amount of data is too little to build a
> > complete bigram table. The situation is detected by the diff below.
> >
> > Did you also experience problems when indexing more files?
> 
> Yes. It's the same error as I get with the complete filesystem.
> 
> > Index: locate.code.c
> > ===================================================================
> > RCS file: /cvs/src/usr.bin/locate/code/locate.code.c,v
> > retrieving revision 1.14
> > diff -u -p -r1.14 locate.code.c
> > --- locate.code.c   19 Feb 2007 20:01:12 -0000      1.14
> > +++ locate.code.c   15 Mar 2007 09:25:18 -0000
> > @@ -149,6 +149,9 @@ main(int argc, char *argv[])
> >     if (fgets(bigrams, sizeof(bigrams), fp) == NULL)
> >             err(1, "fgets");
> >  
> > +   if (strlen(bigrams) != BGBUFSIZE)
> > +           errx(1, "bigram array too small to build db, index more files");
> > +
> >     if (fputs(bigrams, stdout) == EOF)
> >             err(1, "stdout");
> >     (void)fclose(fp);
> 
> That patch is probably not exactly what you meant since:
> 
> % sudo /usr/libexec/locate.updatedb
> locate.code: bigram array too small to build db, index more files

Hmm, can you instrument /usr/libexec/locate.updatedb with a 

        .... tee /tmp/myflist |

on line 101 to see the filelist it actualy builds?

        -Otto

Reply via email to