https://bugs.kde.org/show_bug.cgi?id=438528

            Bug ID: 438528
           Summary: balooctl could use a remove subcommand to remove
                    duplicate IDs
           Product: frameworks-baloo
           Version: 5.82.0
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: balooctl
          Assignee: baloo-bugs-n...@kde.org
          Reporter: skierp...@gmail.com
  Target Milestone: ---

SUMMARY
It's possible to have multiple entries in Baloo's index for a file path due to
the way it generates its internal IDs (see bug 438382). `baloosearch --id some
terms` will show these IDs but you can't clear particular IDs.

STEPS TO REPRODUCE
1. Get into a state where Baloo's index has multiple IDs for a file. This
happens to me with files I often edit on a mounted NTFS partition which I told
Baloo to index.
2. baloosearch for terms in this file, using its --id option
3. Try to remove the errant IDs with balooctl clear

OBSERVED RESULT
E.g.
  % baloosearch --id FuelCellWorks
  500d900000803 /media/Windows/Users/spage/Documents/ECO.txt
  5be2000000803 /media/Windows/Users/spage/Documents/ECO.txt
  8546e00000803 /media/Windows/Users/spage/Documents/ECO.txt
  ...

EXPECTED RESULT

You should be able to clear particular IDs from Baloo's index. It would work
like this:
  % balooctl remove 5be2000000803 nosuchid666 8546e00000803 
  Removing ID 5be2000000803 from index.
  ID nosuchid666 not found in index.
  Removing ID 8546e00000803 from index.
  2 IDs removed from Baloo's index.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2 on Wayland

ADDITIONAL INFORMATION
The logic in balooctl clear may be broken, bug 438527. If that were fixed, then
you could repeatedly enter `balooctl clear /path/to/file` and eventually all
the IDs would clear, and then you could `touch /path/to/file` and get Baloo to
reindex.  However, I think this would first remove the ID that matches the file
on-disk, and it seems generally useful to have a remove [IDs] subcommand.

Maybe removeID is a better subcommand name, but then you'd want arbitrary
capitalization handling... "Rewrite it in Rust" 😉

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to