From: Gilles D. <gr...@sc...> - 2001-11-21 18:50:31
|
According to Dan Langille: > I've found a situation wherein rundig will not rename the work files. I > think this is a side-effect of using a configuration file. > > Here's the command line: > > rundig -a -c /usr/local/etc/htdig-freebsddiary.org.conf > > Here's the files: > > $ ls /usr/local/share/htdig/*.work > /usr/local/share/htdig/freebsddiary.docdb.work > /usr/local/share/htdig/freebsddiary.wordlist.work > /usr/local/share/htdig/freebsddiary.docs.index.work > /usr/local/share/htdig/freebsddiary.words.db.work > > Within the conf file, I have this entry: > > database_base: ${database_dir}/freebsddiary The problem isn't so much a side-effect of using a configuration file, as it is a side-effect of changing database_base and/or database_dir in your config file. If you change database_dir, you should change DBDIR accordingly in rundig. If you change database_base, you should change the "db." string in the file name below... > The problem arises in this part of the file: > > ( cd $DBDIR && test -f db.docdb.work && > > If that is changed to: > > ( cd $DBDIR && > > The files are actually renamed. > > I can't think of a simple fix. There isn't really a simple fix, because there's no simple way of making rundig understand the config attributes in the given config file. So, you need to be consistent in your settings if you use rundig. You can remove the test above, as you did, but then you'll get a spurious error message if there are no .work files to move after a rundig that didn't dig anything. > But perhaps adding a note to the > documentation and/or rundig itself until this is fixed... > > Or have I missed a simpler solution? The 3.1.6 and 3.2.0b4 snapshots finally document rundig, and include tips on customizing. I mentioned the problem of changing database_dir, but not database_base, so I should add a note about that. -- Gilles R. Detillieux E-mail: <gr...@sc...> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil Dept. Physiology, U. of Manitoba Phone: (204)789-3766 Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930 |