Bug 479513 - Newly installed applications are sometimes not indexed until plasmashell is restarted
Summary: Newly installed applications are sometimes not indexed until plasmashell is r...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) (show other bugs)
Version: 5.91.0
Platform: Fedora RPMs Linux
: HI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
: 480590 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-01-07 17:12 UTC by Alessandro Astone
Modified: 2024-02-01 21:13 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Astone 2024-01-07 17:12:00 UTC
Installing a new program that provides a desktop file used to make it show up in kickoff right away.
In Plasma 6 this doesn't happen, I need to `sudo update-desktop-database`, or logout/reboot.
However it works in krunner?!

This also works correctly for applications that were previously indexed: when removed they don't show up in kickoff anymore, and when re-installed they immediatly show up in kickoff.


STEPS TO REPRODUCE
1. Install an new application from Discover
2. Search for it in kickoff
3. Search for it in krunner

OBSERVED RESULT
Kickoff doesn't show it, krunner does

EXPECTED RESULT
Both kickoff and krunner show it

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora Rawhide KDE
(available in About System)
KDE Plasma Version: 5.91.0
KDE Frameworks Version: 5.247.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION
Comment 1 Alexander Lohnau 2024-01-11 21:53:57 UTC
Restarting krunner does not seem to help either - I have to run kbuildsycoca manually to pick up new app/changed apps
Comment 2 Alexander Lohnau 2024-01-13 17:56:17 UTC
I tried debugging this, bit it now appears to work fine. Maybe a temporary issue that got fixed in another place?

Can you check the timestamps of the respective directories to find out if they have changed? Maybe you can manually remove the files and reinstall the package to be sure.
Comment 3 Alessandro Astone 2024-01-15 18:39:34 UTC
(In reply to Alexander Lohnau from comment #2)
> I tried debugging this, bit it now appears to work fine. Maybe a temporary
> issue that got fixed in another place?

I'm trying again on Plasma 6 RC1, and *sometimes* it works, other times it doesn't

> Can you check the timestamps of the respective directories to find out if
> they have changed? Maybe you can manually remove the files and reinstall the
> package to be sure.

I'm not sure what you mean.

I feel like an important detail here is that krunner always shows the new application while kickoff doesn't.
Comment 4 Alessandro Astone 2024-01-16 15:37:53 UTC
In facts `systemctl --user restart plasma-plasmashell` also works around the issue
Comment 5 Doug 2024-01-19 05:22:05 UTC
This is working for me as of RC1, both in Kickoff and Krunner.
Comment 6 Nate Graham 2024-01-19 16:49:20 UTC
Oh cool. Anyone else?
Comment 7 Alessandro Astone 2024-01-19 16:56:49 UTC
I'm also testing in RC1 and it's not fixed.

Maybe what you're seeing is what i already reported above: "This also works correctly for applications that were previously indexed: when removed they don't show up in kickoff anymore, and when re-installed they immediatly show up in kickoff."

So you have to test with a different application every time
Comment 8 Doug 2024-01-19 17:52:58 UTC
(In reply to Alessandro Astone from comment #7)
> I'm also testing in RC1 and it's not fixed.
> 
> Maybe what you're seeing is what i already reported above: "This also works
> correctly for applications that were previously indexed: when removed they
> don't show up in kickoff anymore, and when re-installed they immediatly show
> up in kickoff."
> 
> So you have to test with a different application every time

These were new apps, and I tried some that aren't KDE apps, too.
Comment 9 Alessandro Astone 2024-01-19 17:58:54 UTC
In my RC1 install it works occasionally, but just trying a couple of different apps i can reproduce the bug
Comment 10 Alexander Lohnau 2024-01-19 18:14:32 UTC
I suspected that there might be an issue with the match session not being properly finished and thus the runner not checking for new apps when it is queried the next time. But that does not seem to be an issue.

I will see if I could add some additional logs, maybe that could help.
Comment 11 Marco Martin 2024-01-22 14:53:33 UTC
Git commit d55422aab0d9da11365de49aae0ef810c942df72 by Marco Martin.
Committed on 22/01/2024 at 15:53.
Pushed by mart into branch 'master'.

Update entries when sycoca changes

Previously when the sycoca db changed, the entries were reloaded only if there were a preferred: scheme (like the browser) otherwise were ignored, but this meant changing name or icon of the entry didn't have any effect until restart
Related: bug 405790

M  +3    -0    applets/kicker/plugin/appentry.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/d55422aab0d9da11365de49aae0ef810c942df72
Comment 12 Marco Martin 2024-01-22 15:04:07 UTC
Git commit ddc5b191b9b1f75abacf3e75f624f6dc04222dfa by Marco Martin.
Committed on 22/01/2024 at 16:04.
Pushed by mart into branch 'Plasma/6.0'.

Update entries when sycoca changes

Previously when the sycoca db changed, the entries were reloaded only if there were a preferred: scheme (like the browser) otherwise were ignored, but this meant changing name or icon of the entry didn't have any effect until restart
Related: bug 405790

M  +3    -0    applets/kicker/plugin/appentry.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/ddc5b191b9b1f75abacf3e75f624f6dc04222dfa
Comment 13 Alessandro Astone 2024-01-22 15:27:39 UTC
Unfortunately i can still reproduce with the patch applied, not every time but something like 40-60% of the times.
Comment 14 Bug Janitor Service 2024-01-23 23:31:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3816
Comment 15 Nicolas Fella 2024-02-01 12:58:22 UTC
*** Bug 480590 has been marked as a duplicate of this bug. ***
Comment 16 Alexander Lohnau 2024-02-01 18:58:44 UTC
Git commit 0284ffa47d99f0c22808009391f5331cb66be7eb by Alexander Lohnau, on behalf of Alessandro Astone.
Committed on 01/02/2024 at 18:47.
Pushed by alex into branch 'master'.

runners/services: Fix refreshing the services list

After bccf4ac7f015d02f216a95a44b1b92b950e9a7fa the
KSycoca::databaseChanged signal is not connected with
Qt::DirectConnection anymore as the comment here suggested,
so we were always disabling the refresh.

M  +0    -1    runners/services/servicerunner.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/0284ffa47d99f0c22808009391f5331cb66be7eb
Comment 17 Alessandro Astone 2024-02-01 19:00:00 UTC
Git commit 05f7f26a17f988242cdb37dc3799487790423e51 by Alessandro Astone.
Committed on 01/02/2024 at 18:58.
Pushed by aleasto into branch 'Plasma/6.0'.

runners/services: Fix refreshing the services list

After bccf4ac7f015d02f216a95a44b1b92b950e9a7fa the
KSycoca::databaseChanged signal is not connected with
Qt::DirectConnection anymore as the comment here suggested,
so we were always disabling the refresh.

M  +0    -1    runners/services/servicerunner.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/05f7f26a17f988242cdb37dc3799487790423e51