Bug 417127 - baloofilerc file not getting updated when issuing balooctl commands
Summary: baloofilerc file not getting updated when issuing balooctl commands
Status: RESOLVED FIXED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: balooctl (show other bugs)
Version: 5.67.0
Platform: Other Linux
: VHI major
Target Milestone: ---
Assignee: Stefan Brüns
URL:
Keywords: regression
: 417508 417670 418513 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-04 06:47 UTC by tagwerk19
Modified: 2020-03-13 17:29 UTC (History)
5 users (show)

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


Attachments
strace of "baloo config set contentIndexing false" (71.15 KB, text/plain)
2020-02-06 20:17 UTC, tagwerk19
Details
strace of "baloo config set contentIndexing false" on 5.17.5 (80.38 KB, application/x-troff-man)
2020-02-06 21:19 UTC, tagwerk19
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tagwerk19 2020-02-04 06:47:06 UTC
SUMMARY:

    The System "Search" settings gives an option to index file content or not. This does not seem to have an effect

STEPS TO REPRODUCE:

    1. Open System Settings, scroll down to Workspace and click on Search, this gives options to "Enable File Search" and "Also index file content" (both these are checked) plus an option to avoid indexing particular folders.

    2. Check the .config/baloofilerc file; this would contain something like:

        [Basic Settings]
        Indexing-Enabled=true

        [General]
        dbVersion=2
        exclude filters=.pch,*.moc,*.fastq.... [etc, etc]
        exclude filters version=5
        first run=false

    3. Clear the "Also index file content" checkbox and apply.

OBSERVED RESULTS:

    No change to the .config/baloofilerc file. If I log out and back in again the "Also index..." checkbox is checked again. Search in Dolphin still shows content matches

EXPECTED RESULTS:

    A line:

        only basic indexing=true

    Should be added to the baloofilerc file and the baloo index rebuilt.

SOFTWARE/OS VERSIONS:

    System Settings 5.17.90
    from Neon Testing

    KDE Plasma 5.17.90
    KDE Frameworks 5.67.0
    Qt 5.13.2
Comment 1 tagwerk19 2020-02-05 21:18:47 UTC
A couple of extra observations...

There's a "baloo_file" process running; clearing the "Enable File Search" in the System Settings, removes that process but similarly does not touch .config/baloofilerc. After logging out and back in again, the baloo_file process is present again.

A test with
   kwriteconfig5 --file baloofilerc --group General --key "only basic indexing" --type bool false
did update the config file
Comment 2 Nate Graham 2020-02-05 21:54:04 UTC
Hmm, when I toggle the setting in the KCM, it sets that to true or false, as appropriate.

What does `balooctl config show contentIndexing` say?

Does the value in the config file get updated if you use the CLI, with:
- `balooctl config set contentIndexing false`
- `balooctl config set contentIndexing true`
Comment 3 tagwerk19 2020-02-05 22:30:21 UTC
Trying...

    balooctl config show contentindexing
    yes

    balooctl config set configindexing false

    balooctl config show contentindexing
    yes

I see no change to the baloofilerc file
Comment 4 tagwerk19 2020-02-05 22:34:51 UTC
Sorry, I'll try that again:

    balooctl config show contentIndexing
    yes

    balooctl config set contentIndexing false

    balooctl config show contentIndexing
    yes
Comment 5 Nate Graham 2020-02-06 18:07:07 UTC
That's very strange. What are the permissions on the config file? Are they set correctly?
Comment 6 tagwerk19 2020-02-06 20:17:05 UTC
Created attachment 125723 [details]
strace of "baloo config set contentIndexing false"

Permissions are: 0600, I presume that's OK...

kwriteconfig5 was able to change settings. Also noticed that if I clear the File Search "Enable File Search" checkbox, the "first run" option in baloofilerc gets set to true. I think its not a permissions issue.

Not up to debugging but did run an strace on balooctl (the "balooctl config set contentIndexing false"), the result is attached (done in a newly set up username). I feel I ought to see it opening .config/baloofilerc for writing...
Comment 7 tagwerk19 2020-02-06 21:19:04 UTC
Created attachment 125726 [details]
strace of "baloo config set contentIndexing false" on 5.17.5

Did equivalent test on a Neon 5.17.5 system (balooctl 5.66.0)

That did as it should; the strace of that is attached.

Attachments should be 'balooctl config...'
Comment 8 tagwerk19 2020-02-08 09:47:20 UTC
Balooctl behaviour reproduced in a clean install of Neon Testing (running as a KVM guest).

From neon-testing-20200204-1039.iso, brought up to date 2020/02/08. No customisation. Test username

    Balooctl 5.67.0
    KDE Plasma 5.18.0
    KDE Frameworks 5.67.0
    Qt 5.13.2

Seems that "balooctl config set ..." or "add ..." does not update the .config/baloofilerc file. Behaviour is the same for

    balooctl config set contentIndexing false
    balooctl config set hidden true
    balooctl config add excludeFolders ~/Downloads
Comment 9 Nate Graham 2020-02-10 04:37:28 UTC
Strange. Thanks for the info!
Comment 10 tagwerk19 2020-02-11 14:44:23 UTC
Possible that this is related:

    https://old.reddit.com/r/kde/comments/f1y1g0/baloo_doesnt_resume_after_suspend/

I can corroborate this behaviour for Balooctl 5.64.0 (from Fedora 30) and Balooctl 5.68.0 (from Neon Testing)

A `balooctl suspend` sets indexer suspended (seen in `balooctl status` and `balooctl monitor`) and resume does not kick it back into action. A `balooctl disable; balooctl enable` does restart the indexing.

The disable and enable change the

    [Basic Settings]
    Indexing-Enabled=...

setting (as might be expected)
Comment 11 Nate Graham 2020-02-12 21:12:32 UTC
*** Bug 417508 has been marked as a duplicate of this bug. ***
Comment 12 David Edmundson 2020-02-13 16:55:56 UTC
Git commit a0f8e748159b6bc0b8e5eaa1f9eb58a18ca736fa by David Edmundson.
Committed on 13/02/2020 at 16:52.
Pushed by davidedmundson into branch 'master'.

Sync IndexerConfig on exit

Summary:
KCoreConfigSkeleton, unlike KConfig does not automagically save on exit.

Test Plan:
balooctl disable
balooctl enable

Subscribers: kde-frameworks-devel, #baloo

Tags: #frameworks, #baloo

Differential Revision: https://phabricator.kde.org/D27376

M  +1    -0    src/lib/indexerconfig.cpp

https://commits.kde.org/baloo/a0f8e748159b6bc0b8e5eaa1f9eb58a18ca736fa
Comment 13 Patrick Silva 2020-02-15 21:50:25 UTC
*** Bug 417670 has been marked as a duplicate of this bug. ***
Comment 14 tagwerk19 2020-02-26 18:49:04 UTC
Confirm that the tests

    balooctl config set contentIndexing false
    balooctl config set hidden true
    balooctl config add excludeFolders ~/Downloads

and the System Settings "Enable File Search" and "Also index file content" options work as expected in Neon Testing (Plasma, System Settings 5.18.2,  Frameworks 5.68.0)

Thank you!
Comment 15 Patrick Silva 2020-03-13 17:29:12 UTC
*** Bug 418513 has been marked as a duplicate of this bug. ***