[KinoSearch] Debian Lenny - fs_dir_handle test fails

Paweł Matykiewicz pawel.matykiewicz at gmail.com
Tue Nov 16 06:43:03 PST 2010


Is is possible that this failure is harmless? I was able to index my
files. I didn't check the performance of the index though. I'm sending
you the beginning of the file:

/* Header file auto-generated by Charmonizer.
 * DO NOT EDIT THIS FILE!!
 */

#ifndef H_CHARMONY
#define H_CHARMONY 1

/* DirManip */
#define CHY_HAS_DIRENT_H
#define CHY_HAS_DIRENT_D_TYPE
#define chy_makedir(_dir, _mode) mkdir(_dir, _mode)
#define CHY_MAKEDIR_MODE_IGNORED 0
#define CHY_DIR_SEP "/"
#define CHY_REMOVE_ZAPS_DIRS

#if defined(CHY_USE_SHORT_NAMES) || defined(CHAZ_USE_SHORT_NAMES)
  #define DIR_SEP CHY_DIR_SEP
  #define HAS_DIRENT_H CHY_HAS_DIRENT_H
  #define HAS_DIRENT_D_TYPE CHY_HAS_DIRENT_D_TYPE
  #define makedir chy_makedir
  #define MAKEDIR_MODE_IGNORED CHY_MAKEDIR_MODE_IGNORED
  #define REMOVE_ZAPS_DIRS CHY_REMOVE_ZAPS_DIRS
#endif /* USE_SHORT_NAMES */

/* Headers */
#define CHY_HAS_POSIX
#define CHY_HAS_C89
#define CHY_HAS_C90
...

>
> Somehow, when iterating over contents of the directory, the DirHandle saw
> something called "foo", but didn't properly identify it as a directory.  The
> code that's failing is this, from trunk/core/KinoSearch/Store/FSDirHandle.c:
>
>    #ifdef CHY_HAS_DIRENT_D_TYPE
>    return sys_dir_entry->d_type == DT_DIR ? true : false;
>    #else
>    {
>        struct stat stat_buf;
>        if (!self->fullpath) {
>            self->fullpath = CB_new(CB_Get_Size(self->dir) + 20);
>        }
>        CB_setf(self->fullpath, "%o%s%o", self->dir, CHY_DIR_SEP,
>            self->entry);
>        if (stat((char*)CB_Get_Ptr8(self->fullpath), &stat_buf) != -1) {
>            if (stat_buf.st_mode & S_IFDIR) return true;
>        }
>        return false;
>    }
>
> It would be interesting to know which branch is failing.  Please open up the
> file "charmony.h", which should be right there after the build completes, and
> see whether there's anything there for "CHY_HAS_DIRENT_D_TYPE".
>



-- 
Pawel Matykiewicz
http://www.neuron.m4u.pl
http://www.linkedin.com/in/pawelmatykiewicz



More information about the kinosearch mailing list