Bug 434705 - Never index .cache or Trash folders even when hidden folder indexing is on
Summary: Never index .cache or Trash folders even when hidden folder indexing is on
Status: CONFIRMED
Alias: None
Product: baloo-widgets
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 20.12.3
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Stefan Brüns
URL:
Keywords: usability
: 448539 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-03-21 08:57 UTC by tagwerk19
Modified: 2022-01-16 09:17 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tagwerk19 2021-03-21 08:57:56 UTC
SUMMARY:

    If enabling the "hidden folders' search in baloo, it may be friendlier
    to exclude the cache and wastebasket (as the default)

STEPS TO REPRODUCE:

    Enable baloo, make sure it is indexing $HOME, add "index hidden files
    and folders"

    Run "balooctl monitor" to keep an eye on what's happening in one window
    and run "balooctl purge" in another. Stand back... 

OBSERVED RESULTS

    You'll see "some", "lots" or "shedloads" of files being indexed
    under .cache, maybe also deleted files under .local/shared/Trash 

EXPECTED RESULTS

    "Kinder, Gentler Indexing" :-)

SOFTWARE/OS VERSIONS

    Neon Testing

    Dolphin : 20.12.3
    Plasma : 5.21.3
    Frameworks : 5.81.0
    Qt : 5.15.2 

ADDITIONAL INFORMATION

    Most likely the .cache and wastebasket entries are "noise".
    A line "waiting":

        exclude folders[$e]=$HOME/.cache/,$HOME/.local/share/Trash/

    in .config/baloofilerc would mean if indexing is enabled for hidden
    folders, these start out as excluded.
Comment 1 Nate Graham 2021-03-21 14:56:52 UTC
That's pretty sane, yeah.

Not sure we would want to explicitly add these in the UI, but they could just be automatically skipped in the code.
Comment 2 tagwerk19 2021-03-30 07:11:25 UTC
Might also suggest adding .local/share/baloo

    exclude folders[$e]=$HOME/.cache/,$HOME/.local/share/Trash/,$HOME/.local/share/baloo/

so avoid seeing Bug 435024
Comment 3 sourcemaker 2021-04-27 21:20:52 UTC
exclude folders[$e]=$HOME/.cache/,$HOME/.local/share/Trash/

I tried that.
Baloo is still indexing the excluded folders.
Comment 4 tagwerk19 2021-04-28 09:41:28 UTC
(In reply to sourcemaker from comment #3)
> Baloo is still indexing the excluded folders.
Which version are you using?

I know there were changes in the last months related to 'hidden folders' (Bug 431588, fixed in 5.79)
Comment 5 sourcemaker 2021-04-29 18:23:48 UTC
baloo 5.81.0
Comment 6 tagwerk19 2021-04-29 19:00:37 UTC
Looking at a system with 5.81.0.

My .config/baloofilerc includes the lines:

    exclude folders[$e]=$HOME/.cache/,$HOME/.local/share/Trash/,$HOME/.local/share/baloo/
    folders[$e]=$HOME/
    index hidden folders=true

If I run "balooctl monitor" and then do a "balooctl purge" in another window, I get a stream of files (including files in hidden directories) excluding ~/.cache, ~/.local/share/Trash/, ~/.local/share/baloo/

The only think I can think of to check is whether $HOME is correct (it doesn't, for example, have a trailing slash) try:

    echo $HOME/.cache/

and check that you do get:

    /home/username/.cache/
Comment 7 sourcemaker 2021-04-29 22:59:26 UTC
exclude folders[$e]=$HOME/.cache/,$HOME/.local/share/Trash/,$HOME/.local/share/baloo/
folders[$e]=$HOME
index hidden folders=true

balooctl monitor:

Indexing: /home/sourcemaker/.cache/icon-cache.kcache
Indexing file content
Indexing: /home/sourcemaker/.cache/mozilla/firefox/


Also index file content is enabled.
Comment 8 tagwerk19 2021-04-30 12:57:20 UTC
I'm running out of suggestions, on the basis that we are both running 5.81.0 and you see an issue and I don't...

    Maybe create a new user and check whether you see the same behaviour

    Check whether you've got a "half-installed" system, that your baloo is not all at the 5.81.0 version (and there's no chance that you've updated and not rebooted?)

With "Neon User", when I run:

    $ apt list --installed | grep baloo

I get:

    baloo-kf5/focal,now 5.81.0-0xneon+20.04+focal+release+build23 amd64 [installed,automatic]
    libkf5baloo5/focal,now 5.81.0-0xneon+20.04+focal+release+build23 amd64 [installed,automatic]
    libkf5balooengine5/focal,now 5.81.0-0xneon+20.04+focal+release+build23 amd64 [installed,automatic]
    libkf5baloowidgets-bin/focal,now 4:21.04.0-0xneon+20.04+focal+release+build16 amd64 [installed,automatic]
    libkf5baloowidgets5/focal,now 4:21.04.0-0xneon+20.04+focal+release+build16 amd64 [installed,automatic]
Comment 9 sourcemaker 2021-04-30 18:16:58 UTC
All packages are up to date.
Same behavior with new user.
Comment 10 tagwerk19 2021-05-01 18:36:30 UTC
Sorry, I'm out of ideas.

I tried setting up a clean Neon install (as a KVM guest), neon-user-20210429-0945.iso, and cannot get it to fail.

If you know strace you might be able to use it to see what's happening. Maybe also try not indexing $HOME but adding a "hidden folder" as indexed rather than not indexed.
Comment 11 tagwerk19 2021-05-17 08:49:46 UTC
(In reply to tagwerk19 from comment #2)
> Might also suggest adding .local/share/baloo
Also add .directory to the "exclude filters" list to avoid indexing Dolphin's per directory config. Ref: Bug 437197
Comment 12 tagwerk19 2022-01-16 09:17:40 UTC
*** Bug 448539 has been marked as a duplicate of this bug. ***