1.13 tests txt mods + solaris port (FNM_LEADING_DIR)
This commit is contained in:
parent
7941e16d8f
commit
aed54ee6ee
@ -143,6 +143,9 @@ void libclf_setmaxfd(int max)
|
||||
closefrom_maxfd = max;
|
||||
}
|
||||
|
||||
#ifdef sun
|
||||
#include <limits.h>
|
||||
#endif
|
||||
int libclf_closefrom(int fd0)
|
||||
{
|
||||
int i, maxfd = closefrom_maxfd;
|
||||
|
||||
@ -125,20 +125,29 @@ bool FsTreeWalker::setSkippedPaths(const list<string> &paths)
|
||||
*it = path_canon(*it);
|
||||
return true;
|
||||
}
|
||||
bool FsTreeWalker::inSkippedPaths(const string& path)
|
||||
bool FsTreeWalker::inSkippedPaths(const string& path, bool ckparents)
|
||||
{
|
||||
int fnmflags = FNM_PATHNAME;
|
||||
#ifdef FNM_LEADING_DIR
|
||||
if (ckparents)
|
||||
fnmflags |= FNM_LEADING_DIR;
|
||||
#endif
|
||||
list<string>::const_iterator it;
|
||||
for (it = data->skippedPaths.begin();
|
||||
it != data->skippedPaths.end(); it++) {
|
||||
// If we find a system where FNM_LEADING_DIR is undefined (its
|
||||
// unposixy), will have to do this for all ascendant paths up
|
||||
// to the topdir. We'll then have a constructor option because
|
||||
// this is only useful when called externally. When used
|
||||
// internally, we don't descend in skipped paths, and so don't
|
||||
// need FNM_LEADING_DIR
|
||||
if (fnmatch(it->c_str(), path.c_str(), FNM_PATHNAME |
|
||||
FNM_LEADING_DIR) == 0)
|
||||
return true;
|
||||
#ifndef FNM_LEADING_DIR
|
||||
if (ckparents) {
|
||||
string mpath = path;
|
||||
while (mpath.length() > 2) {
|
||||
if (fnmatch(it->c_str(), mpath.c_str(), fnmflags) == 0)
|
||||
return true;
|
||||
mpath = path_getfather(mpath);
|
||||
}
|
||||
} else
|
||||
#endif /* FNM_LEADING_DIR */
|
||||
if (fnmatch(it->c_str(), path.c_str(), fnmflags) == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -217,7 +226,12 @@ FsTreeWalker::Status FsTreeWalker::iwalk(const string &top,
|
||||
continue;
|
||||
}
|
||||
if (!data->skippedPaths.empty()) {
|
||||
if (inSkippedPaths(fn))
|
||||
// We do not check the ancestors. This means that you can have
|
||||
// a topdirs member under a skippedPath, to index a portion of
|
||||
// an ignored area. This is the way it had always worked, but
|
||||
// this was broken by 1.13.00 and the systematic use of
|
||||
// FNM_LEADING_DIR
|
||||
if (inSkippedPaths(fn, false))
|
||||
goto skip;
|
||||
}
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ class FsTreeWalker {
|
||||
|
||||
/** Test if path/name should be skipped. This can be used independantly of
|
||||
* an actual tree walk */
|
||||
bool inSkippedPaths(const string& path);
|
||||
bool inSkippedPaths(const string& path, bool ckparents = true);
|
||||
bool inSkippedNames(const string& name);
|
||||
|
||||
private:
|
||||
|
||||
@ -1 +1 @@
|
||||
FreqFor maildir_uniquexxx : 692
|
||||
FreqFor maildir_uniquexxx : 691
|
||||
|
||||
@ -5,7 +5,7 @@ topdir=`dirname $0`/..
|
||||
|
||||
initvariables $0
|
||||
|
||||
recollq 'Beatles OR Lennon Live OR Unplugged' 2> $mystderr |
|
||||
recollq 'andorhuniique Beatles OR Lennon Live OR Unplugged' 2> $mystderr |
|
||||
egrep -v '^Recoll query: ' > $mystdout
|
||||
|
||||
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
2 results
|
||||
text/plain [file:///home/dockes/projets/fulltext/testrecoll/andor/bu.txt] [bu.txt] 18 bytes
|
||||
text/plain [file:///home/dockes/projets/fulltext/testrecoll/andor/leli.txt] [leli.txt] 12 bytes
|
||||
2 results
|
||||
text/plain [file:///home/dockes/projets/fulltext/testrecoll/andor/bu.txt] [bu.txt] 32 bytes
|
||||
text/plain [file:///home/dockes/projets/fulltext/testrecoll/andor/leli.txt] [leli.txt] 26 bytes
|
||||
|
||||
@ -8,9 +8,9 @@ initvariables $0
|
||||
# We need an UTF-8 locale here for recollq arg transcoding
|
||||
LANG=en_US.UTF-8
|
||||
export LANG
|
||||
recollq 'まず' 2> $mystderr |
|
||||
recollq 'keyword:ckjtsthuniique まず' 2> $mystderr |
|
||||
egrep -v '^Recoll query: ' > $mystdout
|
||||
recollq 'ます' 2>> $mystderr |
|
||||
recollq 'keyword:ckjtsthuniique ます' 2>> $mystderr |
|
||||
egrep -v '^Recoll query: ' >> $mystdout
|
||||
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
3 results
|
||||
message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/cjk/mbox] [Re: recoll sidux and -ja] 68397 bytes
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/cjk/mazu.html] [mazu.html] 260 bytes
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/cjk/japanese.html] [japanese.html] 1403 bytes
|
||||
message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/cjk/mbox] [Re: recoll sidux and -ja] 68397 bytes
|
||||
4 results
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/cjk/term-konsole-ja.htm] [sidux Manuals - The Terminal or Konsole] 34269 bytes
|
||||
message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/cjk/mbox] [Re: recoll sidux and -ja] 68397 bytes
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/cjk/masu.html] [masu.html] 215 bytes
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/cjk/japanese.html] [japanese.html] 1403 bytes
|
||||
message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/cjk/mbox] [Re: recoll sidux and -ja] 68397 bytes
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/cjk/term-konsole-ja.htm] [sidux Manuals - The Terminal or Konsole] 34269 bytes
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
2 results
|
||||
message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/mail/outmail] [Re: CDNow, mkfichcom.tcl and "] 2248233 bytes
|
||||
message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/mail/outmail] [Home Ip] 2248233 bytes
|
||||
message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/mail/outmail] [Re: CDNow, mkfichcom.tcl and "] 2248254 bytes
|
||||
message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/mail/outmail] [Home Ip] 2248254 bytes
|
||||
1 results
|
||||
message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/mail/BadHtmlInMail] [Prochaine rando] 3637 bytes
|
||||
1 results
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
1 results
|
||||
2 results
|
||||
application/msword [file:///home/dockes/projets/fulltext/testrecoll/msword/programme.doc] [programme.doc] 58880 bytes
|
||||
application/msword [file:///home/dockes/projets/fulltext/testrecoll/zip/misc.zip] [misc.zip] 168155 bytes
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
2 results
|
||||
text/plain [file:///home/dockes/projets/fulltext/testrecoll/txt/liste.txt] [liste.txt] 1165 bytes
|
||||
2 results
|
||||
text/plain [file:///home/dockes/projets/fulltext/testrecoll/txt/liste.txt] [liste.txt] 1182 bytes
|
||||
text/plain [file:///home/dockes/projets/fulltext/testrecoll/txt/liste1.txt] [liste1.txt] 893 bytes
|
||||
|
||||
@ -126,6 +126,10 @@
|
||||
<a href="CHANGES.html">Changes</a>. <a href="BUGS.html">Bugs</a>.
|
||||
</p>
|
||||
|
||||
<p>For building on Solaris (at least 5.8), you need to apply
|
||||
this <a href="sunos/recoll11300solaris.patch">patch</a> to the
|
||||
Recoll source.</p>
|
||||
|
||||
<p>In order to build Recoll from source, you will need to install
|
||||
the Xapian core development libraries. You will find source and binary
|
||||
packages on the <a href="http://www.xapian.org/download.php">
|
||||
@ -289,21 +293,11 @@ gpg --export --armor A0735AD0 | sudo apt-key add -
|
||||
<blockquote>
|
||||
<p>Note to Solaris users: you need to perform the initial
|
||||
indexing pass with "recollindex", not the recoll GUI indexing
|
||||
thread. See <a href="BUGS.html">errata</a>.</p>
|
||||
<p>Also you need a small patch to compile on solaris (version 8 at
|
||||
least). In directory utils, you need to
|
||||
include <tt><limits.h></tt> in <tt>closefrom.cpp</tt>
|
||||
<pre><tt>
|
||||
diff -w closefrom.cpp.orig closefrom.cpp
|
||||
145a146,148
|
||||
> #ifdef sun
|
||||
> #include <limits.h>
|
||||
> #endif
|
||||
</tt></pre>
|
||||
thread. See <a href="BUGS.html">errata</a>.
|
||||
|
||||
<p><b>Solaris 8 SPARC</b>:
|
||||
<a href="sunos/recoll-1.12.3-SunOS-5.8.tgz">
|
||||
recoll-1.12.3-SunOS-5.8.tgz</a>. </p>
|
||||
<a href="sunos/recoll-1.13.00-SunOS-5.8.tgz">
|
||||
recoll-1.13.00-SunOS-5.8.tgz</a>. </p>
|
||||
|
||||
<p>Recoll also builds and runs on Solaris 10, but, given the
|
||||
situation (2008) of open source packages for Solaris (very old
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user