SUMMARY `balooctl index /path/to/file` should print an error and return non-zero status if it fails to index a file's contents. STEPS TO REPRODUCE 1. Find a file that shows up in `balooctl failed` output, even after I clear it and index it (see bug 501613). 2. Turn on baloo and kfilemetadata logging by adding kf.filemetadata=true kf.baloo=true to ~/.config/QtProject/qtlogging.ini 3. In another terminal window, clear the problematic file from the index again and index it (note in Fedora, the command is `balooctl6`) and print the exit status of the index command. % balooctl clear /path/to/Mail/Foldername % balooctl index /path/to/Mail/Foldername % echo $? % balooctl failed OBSERVED RESULT The index command prints Indexing /media/Windows/Users/spage/Thunderbird_profiles/1y6g4zic.default/Mail/Local Folders/Diary File(s) indexed `echo $?` displays 0, i.e. the index command completed successfully. But the logging prints out: kf.filemetadata: Extracting UTF-8 "\r\n" plain text from "/path/to/Mail/Foldername" kf.filemetadata: Invalid encoding. Ignoring "/path/to/Mail/Foldername" and the problematic file is still in the list of failed files. EXPECTED RESULT If content indexing fails, tell the user (even without logging enabled) and return a non-zero exit status. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Plasma Version: 6.4.5 KDE Frameworks Version: 6.19.0 Qt Version: 6.9.2 ADDITIONAL INFORMATION Few people will ever run `balooctl index /path/to/file`; normally the baloo_file process indexed files in the background. I believe its failures to index file content should likewise be logged in the system log by default, although in another bug comment (?) someone (Nate?) expressed concern that such error logging might reveal the path to a file and its contents.
I need to do some more tests, but it does seem that balooctl6 doesn't return an error code....