baloodb: Add clean command
Summary:
Remove stale entries from database
This is mostly based on D11038
Depends on D11745
Test Plan:
$ baloodb clean --mounted-only Removing stale database contents... Ignoring device 2086 Ignoring device 2098 Ignoring device 2069 Ignoring device 2064 Ignoring device 2066 Database has corrupted entries baloo may misbehave, please recreate the DB by running $ balooctl disable && balooctl enable Removing: device: 2049 inode: 4861 url: /tmp/otto ... Removing: device: 2053 inode: 39208001 url: //Little Witch Academia - 08.mkv Removing: device: 2053 inode: 39215245 url: Removed 14965 items Elapsed: 4.6921 secs
Second run:
$ baloodb clean --mounted-only Removing stale database contents... access filter QFlags(0x4) Ignoring device 2086 Ignoring device 2098 Ignoring device 2066 Ignoring device 2064 Ignoring device 2069 Removing: device: 22 inode: 225383 url: Removing: device: 2053 inode: 34612126 url: Removed 14943 items Elapsed: 3.47939 secs
Reviewers: Baloo, Frameworks, bruns
Reviewed By: Baloo, bruns
Subscribers: bruns, cfeck, smithjd
Tags: Frameworks, Baloo
Maniphest Tasks: T8250
Differential Revision: https://phabricator.kde.org/D11753