Bug 421924

Summary: Discover doesn't find updates for plasma addons unless I open their respective "Get new <thing>" windows in system settings before
Product: [Applications] Discover Reporter: Patrick Silva <bugseforuns>
Component: KNewStuff BackendAssignee: Dan Leinir Turthra Jensen <leinir>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, kdebugs, nate
Priority: NOR    
Version: 5.18.90   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Patrick Silva 2020-05-22 17:01:58 UTC
SUMMARY
If there are updates for addons from KDE Store installed on our system,
Discover will not find them until we open their respective "Get new <addon>" windows in system settings.

STEPS TO REPRODUCE
1. install some plasma addon (plasma style or icon theme, for example)
via "Get new <addon>" window in its respective kcm in system settings
2. wait for a update for the just installed addon to be released
3. open Discover and wait it to fetch updates (Discover doesn't find any update for your addon)
4. close Discover
5. open the "Get new <addon>" window used in the step 1 and wait the addons info to be loaded
6. close both "Get new <addon>" window and system settings
7. reopen Discover: now it finds the addon update as expected

EXPECTED RESULT
Discover should always find updates for addons installed from KDE Store.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.18.90
KDE Frameworks Version: 5.70.0
Qt Version: 5.15 rc2
Comment 1 Aleix Pol 2020-07-30 23:30:58 UTC
Probably related to #417987.
Comment 2 Bug Janitor Service 2020-07-31 12:31:01 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/17
Comment 3 Dan Leinir Turthra Jensen 2020-07-31 13:35:14 UTC
Git commit 41b790f6d1aa22a59bb5bcb643f94776e6eaa839 by Dan Leinir Turthra Jensen.
Committed on 31/07/2020 at 12:26.
Pushed by leinir into branch 'master'.

Load the KNewStuff updates information on Discover startup

Without this, Discover only loads the installed items, but does not
also check whether there are updates available. This is cached by
the KNSCore::Engine, so we don't need the throttling in Discover itself,
but also if this is not done during the initialisation step, the updates
information will simply not be available.
Related: bug 417987

M  +12   -0    libdiscover/backends/KNSBackend/KNSBackend.cpp

https://invent.kde.org/plasma/discover/commit/41b790f6d1aa22a59bb5bcb643f94776e6eaa839