improve handling of missing helpers messages

This commit is contained in:
dockes
2007-02-08 17:05:12 +00:00
parent eed2c43cf9
commit 490818138d
7 changed files with 90 additions and 22 deletions
+10 -1
View File
@@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: indexer.cpp,v 1.52 2007-02-06 18:01:57 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: indexer.cpp,v 1.53 2007-02-08 17:05:12 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -131,6 +131,12 @@ bool DbIndexer::indexDb(bool resetbefore, list<string> *topdirs)
m_dbdir.c_str()));
return false;
}
if (!m_missingExternal.empty()) {
string missing;
stringsToString(m_missingExternal, missing);
LOGERR(("DbIndexer::index missing helper program(s): %s\n",
missing.c_str()));
}
return true;
}
@@ -387,6 +393,9 @@ DbIndexer::processone(const std::string &fn, const struct stat *stp,
string ipath;
fis = interner.internfile(doc, ipath);
if (fis == FileInterner::FIError) {
list<string> ext = interner.getMissingExternal();
m_missingExternal.merge(ext);
m_missingExternal.unique();
// We dont stop indexing for one bad doc
return FsTreeWalker::FtwOk;
}
+2 -1
View File
@@ -16,7 +16,7 @@
*/
#ifndef _INDEXER_H_INCLUDED_
#define _INDEXER_H_INCLUDED_
/* @(#$Id: indexer.h,v 1.22 2006-11-30 13:38:44 dockes Exp $ (C) 2004 J.F.Dockes */
/* @(#$Id: indexer.h,v 1.23 2007-02-08 17:05:12 dockes Exp $ (C) 2004 J.F.Dockes */
#include <string>
#include <list>
@@ -143,6 +143,7 @@ class DbIndexer : public FsTreeWalkerCB {
Rcl::Db m_db;
string m_tmpdir;
DbIxStatusUpdater *m_updater;
list<string> m_missingExternal; // Names of missing helper programs
bool init(bool rst = false, bool rdonly = false);
};