Bug 429910 - Settings -> File search: Folder specific configuration list: self-reproducing, irremovable items of '/home/<username>' with 'indexed' value
Summary: Settings -> File search: Folder specific configuration list: self-reproducing...
Status: CONFIRMED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.89.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
: 439403 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-12-01 20:36 UTC by pveax
Modified: 2024-11-17 10:50 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
irremovable item example (117.70 KB, image/png)
2020-12-01 20:36 UTC, pveax
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pveax 2020-12-01 20:36:20 UTC
Created attachment 133790 [details]
irremovable item example

SUMMARY

KDE Settings -> "File search": "Folder specific configuration" list: permanent item of '/home/<username>' with 'indexed' value.

STEPS TO REPRODUCE

1. Open KDE Settings GUI. Section "Search". Sub-section "File Search".
2. There is the item '/home/<username>' w/ value of "indexed" in "Folder specific configuration" list already. Try to remove it by clicking on Wastebin icon. Item removed. List is empty.
3. Press Apply btn. Looks like ok, but do not be so fast.
4. Change sub-section to another for example "KRunner" and change back to "File search".

OBSERVED RESULT

You'll see that item which was removed is present again.

EXPECTED RESULT

Item which was removed should be deleted.

STEPS TO REPRODUCE-2

Moreover:
If to change the value of that default '/home/<username>' item from 'indexed' to 'not indexed', press 'Apply' btn, then change to another sub-section and went back to 'File search', then you will see 2 items: yours with "not indexed" and added the same but w/ "indexed" value.

SOFTWARE/OS VERSIONS

Operating System: Manjaro Linux
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.2
Kernel Version: 5.10.0-1-MANJARO
OS Type: 64-bit

ADDITIONAL INFORMATION

Thank you for your work and product you give us!
Comment 1 Laura David Hurka 2021-06-28 20:37:54 UTC
Apparently the “Delete entry” button has been disabled in the meantime, but that is only a facade. Changing to “Not indexed” still pollutes the configuration with contradicting items instead of changing the configuration.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.2
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.3
Comment 2 tagwerk19 2021-06-29 10:20:25 UTC
(In reply to David Hurka from comment #1)
> ... Changing to “Not indexed” still pollutes the configuration
> with contradicting items instead of changing the configuration ...
Oh yes, I have seen it happen. Now, can I get it to do it again?
Comment 3 tagwerk19 2021-06-29 11:38:57 UTC
(In reply to tagwerk19 from comment #2)
> ... Now, can I get it to do it again?
Most straightwordly, if you have a .config/baloofilerc containing:

    [Basic Settings]
    Indexing-Enabled=true

    [General]
    dbVersion=2
    exclude filters=*~,*.part,*.o,*.la,*.lo,*.loT,*.moc... et al...
    exclude filters version=8
    exclude folders[$e]=$HOME/

Gives you the two lines in the System Settings -> Search, one with "Indexed" and one "Not indexed"
Comment 4 pveax 2021-08-15 22:52:50 UTC
Irremovable item of `/home/<username>` with the `indexed` value persists.

---
System Info:

Operating System: Manjaro Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.14.0-1-MANJARO (64-bit)
Graphics Platform: X11
Comment 5 pveax 2021-08-15 22:55:04 UTC
```
$ pacman -Qi krunner 
Name            : krunner
Version         : 5.85.0-1
...
```
Comment 6 tagwerk19 2021-08-16 07:23:00 UTC
(In reply to pveax from comment #4)
> Irremovable item of `/home/<username>` with the `indexed` value persists.
What do you have in your .config/baloofilerc file?

Specifically, the "folders[$e]" and "exclude folders[$e]" lines. You might have ended up with something like

    folders[$e]=$HOME/,$HOME/

or the config referred to in Comment 3
Comment 7 pveax 2021-09-01 13:32:31 UTC
> What do you have in your .config/baloofilerc file?

Hi, tagwerk19!

Currently it is:

```
[Basic Settings]
Indexing-Enabled=false

[General]
dbVersion=2
exclude filters=<long line. hidden 'til the end of line>
exclude filters version=8
only basic indexing=true
```

But I have that /home/<username> item in the `Folder specific configuration:` list.

Most probably it is hard-coded somewhere.
The issue `Reported:	2020-12-01`.
Is it almost impossible to that bug to be that complicated to locate it in code and to understand why it was hard-coded instead of using configuration which contains the `~/.config/baloofilerc` file.

Probably the bug is poor-described. Let me fix it:

Behavior is the next:
0. Press "Start" btn (meta key)
1. Open `System Settings`.
2. Go to `Workspace` section. Than `Search` -> `File search`.
3. Check `Enable File Search` to enable it.
The `Folder specific configuration:` became editable. It contains /home/<username> item with the `indexed` option chosen by default. it is the only item in the list.
4. Press `Apply`.
5. Switch to `KRunner` item in the left panel (there are 3 items only, 3rd is `Web Search Keywords`).
6. Switch back to `File Search` item.

Only 1 item is present. No changes.

the `~/.config/baloofilerc` file became:
```
[General]
dbVersion=2
exclude filters=<hidden>
exclude filters version=8
only basic indexing=true
```

7. We have only one item listed. Change it mode from `Indexed` to `Not indexed`.
8. Hit `Apply` btn.

No I see the the only item in that list.
The `~/.config/baloofilerc` file became:
```
[General]
dbVersion=2
exclude filters=<hidden>
exclude filters version=8
exclude folders[$e]=$HOME/
only basic indexing=true
```

9. Re-do the (5) and (6) steps (so just switch to show another component settings and back).
10. Now I see that 2 items are listed:
/home/<username> Indexed
/home/<username> Not indexed

The `~/.config/baloofilerc` file became:
```
[General]
dbVersion=2
exclude filters=<hidden>
exclude filters version=8
exclude folders[$e]=$HOME/
only basic indexing=true
```

So on some stage of (9) step some component adds that additional "/home/<username> Indexed" item. That's the point of bug.
Let a user to manage the list without malware-like behavior of constantly added of the "/home/<username> Indexed" (so non-removable) item.

It is not about config: `~/.config/baloofilerc` does not rule that unwanted silent behavior. Most probably it is hard-coded.

---
Current System Info:
```
Operating System: Manjaro Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.14.0-0-MANJARO (64-bit)
Graphics Platform: X11
```

Are there any more questions?


Thanks!
Comment 8 tagwerk19 2021-09-02 19:39:03 UTC
(In reply to pveax from comment #7)
> But I have that /home/<username> item in the `Folder specific
> configuration:` list.
Yes, I have that visible in the System Settings > Search but not there in .config/baloofilerc.

Then when you change the "Indexed" to "Not Indexed" in System Settings, baloofilerc is changed to:

> [General]
> dbVersion=2
> exclude filters=<hidden>
> exclude filters version=8
> only basic indexing=true
And then you get your:

> 10. Now I see that 2 items are listed:
> /home/<username> Indexed
> /home/<username> Not indexed
in the GUI and the only way of getting out of the problem is to manually edit the baloofilerc.

Yes, it's reproducable and I get the same on Neon Unstable.
Comment 9 tagwerk19 2021-09-02 19:42:33 UTC
(In reply to tagwerk19 from comment #8)
> Then when you change the "Indexed" to "Not Indexed" in System Settings,
> baloofilerc is changed to:
> 
> > [General]
> > dbVersion=2
> > exclude filters=<hidden>
> > exclude filters version=8
> > only basic indexing=true
Apologies...
Cut and paste problem, should read baloofilerc is changed to:

> [General]
> dbVersion=2
> exclude filters=<hidden>
> exclude filters version=8
> exclude folders[$e]=$HOME/
> only basic indexing=true
Comment 10 pveax 2021-09-03 15:16:43 UTC
>and the only way of getting out of the problem is to manually edit the baloofilerc.

No, the problem in that very issue is that
'/home/<username>' with 'indexed' value
can not be removed:
neither via GUI,
nor via the `~/.config/baloofilerc` config file.

That's the point if the issue as it's title says that:
```
Settings -> File search: Folder specific configuration list: self-reproducing, irremovable items of '/home/<username>' with 'indexed' value
```

If you have another issue, open another bug report, please, do not change that issue description to the one you meet.

Thank you!
Comment 11 tagwerk19 2021-09-04 07:27:02 UTC
(In reply to pveax from comment #10)
> No, the problem in that very issue is that
> '/home/<username>' with 'indexed' value
> can not be removed:
> neither via GUI,
> nor via the `~/.config/baloofilerc` config file.
My apologies.

I'd got hooked on the issue that you could end up with both an "indexed" and a "not-indexed" entry. A case study in "not quite understanding" the report :-/
Comment 12 pveax 2021-09-05 20:43:07 UTC
Sorry for my English.
Comment 13 pveax 2021-09-23 03:42:12 UTC
```
$ balooctl status
Baloo is currently disabled. To enable, please run balooctl enable
$ balooctl config show includeFolders
/home/m/
$ balooctl config rm includeFolders /home/m
$ balooctl config rm includeFolders /home/m/
$ balooctl config show includeFolders
/home/m/
$ balooctl -v
baloo 5.86.0
$
```

Unable to remove a user home folder via TUI also.
Comment 14 pveax 2021-10-10 18:48:44 UTC
Got the update, now it is
```
Operating System: Manjaro Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.15.0-1-MANJARO (64-bit)
Graphics Platform: X11
```
and
```
$ balooctl -v
baloo 5.87.0
```
but it still can't remove the item.
Comment 15 Massimiliano L 2021-12-28 09:26:29 UTC
*** Bug 439403 has been marked as a duplicate of this bug. ***
Comment 16 Yayayayieya 2024-11-16 22:39:25 UTC
Still not fixed in Plasma version 6.2.3