Unknown reporter writes

Recoll version: Recoll 1.21.5 + Xapian 1.2.22 Tmsu version: 0.6.1

Steps to reproduce the issue:

#!bash

cd ~
mkdir tmsutest
cd tmsutest
tmsu init .
touch testfile
tmsu tag file mytag

tmsu files mytag results in testfile, i.e. works.

Here is my recoll.conf:

#!config

topdirs = /home/user/tmsutest
metadatacmds = ; tags = tmsu tags %f;

Running recollindex -z gives:

#!error

:3:recollindex.cpp:517:recollindex: changing current directory to [/tmp]
:3:recollindex.cpp:550:recollindex: starting up
tmsu: no database found: use 'tmsu init' to create one
tmsu: no database found: use 'tmsu init' to create one
tmsu: no database found: use 'tmsu init' to create one
tmsu: no database found: use 'tmsu init' to create one
:3:../rcldb/rcldb.cpp:607:Db::add: docid 1 added [/home/user/tmsutest|]
:3:../rcldb/rcldb.cpp:607:Db::add: docid 2 added [/home/user/tmsutest/file|]
:3:../rcldb/rcldb.cpp:607:Db::add: docid 3 added [/home/user/tmsutest/.tmsu/db|]
:3:../rcldb/rcldb.cpp:607:Db::add: docid 4 added [/home/user/tmsutest/.tmsu|]
tmsu: no database found: use 'tmsu init' to create one
:3:../rcldb/rcldb.cpp:607:Db::add: docid 5 added [/home/user/tmsutest/output|]
:3:../rcldb/rcldb.cpp:1691:Db::waitUpdIdle: total xapian work 45 mS
:3:../index/fsindexer.cpp:246:fsindexer index time:  55 mS
:3:../utils/workqueue.h:202:DbUpd: tasks 5 nowakes 7 wsleeps 3 csleeps 1
:2:../utils/workqueue.h:148:WorkQueue::waitIdle:DbUpd: not ok or can't lock
:3:../rcldb/rcldb.cpp:1691:Db::waitUpdIdle: total xapian work 45 mS
:3:../rcldb/rcldb.cpp:1691:Db::waitUpdIdle: total xapian work 29 mS
:3:../utils/workqueue.h:202:DbUpd: tasks 0 nowakes 0 wsleeps 1 csleeps 0
:3:../utils/workqueue.h:202:Internfile: tasks 5 nowakes 3 wsleeps 8 csleeps 1
:3:../utils/workqueue.h:202:Split: tasks 5 nowakes 5 wsleeps 7 csleeps 0

However running recoll -q tags:mytag doesn’t find testfile.

However it works if I specify the database:

#!config


topdirs = /home/user/tmsutest
metadatacmds = ; tags = tmsu --database=/home/user/tmsutest/.tmsu/db  tags %f;

medoc writes

This is probably a question of how tmsu looks for its tags db. My guess would be that it looks in the current directory if it’s not found in the default place (probably ~/.tmsu ?)

recollindex changes its current directory to /tmp (because some of the external helpers have bugs which leave temporary files in the current directory), so the local tmsu db is not found.

That’s all a guess at this point, but it seems plausible.

I don’t really see a solution other than to specify the tmsu db.

If you have several you can use local values for metadatacmds (by specifying subdir sections in the config).