Bug 404339 - discover update applet not offline-update aware
Summary: discover update applet not offline-update aware
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (other bugs)
Version First Reported In: 5.15.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-14 12:53 UTC by Harald Sitter
Modified: 2019-04-15 16:57 UTC (History)
1 user (show)

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


Attachments
screenshot (222.98 KB, image/png)
2019-02-14 12:54 UTC, Harald Sitter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2019-02-14 12:53:27 UTC
When installing offline updates using PK_OFFLINE_UPDATE=1 the applet does not know about them and continues to report that there are updates available.

STEPS TO REPRODUCE
1. PK_OFFLINE_UPDATE=1 plasma-discover
2. do update

OBSERVED RESULT

applet in systray still saying there are updates with a button to view updates


EXPECTED RESULT

applet should switch into "restart" mode stating that the system has pending updates that require a restart to apply with a button to easily trigger the restart.


SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 5.15
(available in About System)
KDE Plasma Version: 5.15
KDE Frameworks Version: 5.55
Qt Version: 5.12

ADDITIONAL INFORMATION
Comment 1 Harald Sitter 2019-02-14 12:54:36 UTC
Created attachment 118068 [details]
screenshot
Comment 2 Harald Sitter 2019-02-14 13:49:03 UTC
Oh, I think I actually didn't restart plasmashell, so this was still the old applet. Nevermind.
Comment 3 Harald Sitter 2019-02-20 16:15:38 UTC
Reopening

I am now seeing this with a fully updated 5.15 system. What actually happens is that the applet doesn't "refresh" its state.

so:

1. PK_OFFLINE_UPDATE=1 plasma-discover
2. do update
3. open applet
4. see it still saying there are updates

if you then restart plasmshell the applet will correctly switch into reboot-required mode.
I am guessing the applet either needs file watch on the marker file or discover needs to poke the applet to refresh its state.
Comment 4 Aleix Pol 2019-04-15 16:57:32 UTC
Git commit 0ef1323345b9733bfdf295b3f33eef372ad5268b by Aleix Pol.
Committed on 15/04/2019 at 16:54.
Pushed by apol into branch 'master'.

Don't offer system updates while offline

Discover will start giving errors anyway and there's not much to do.

M  +1    -0    notifier/CMakeLists.txt
M  +13   -4    notifier/DiscoverNotifier.cpp
M  +8    -5    notifier/DiscoverNotifier.h
M  +2    -0    notifier/plasmoid/contents/ui/main.qml

https://commits.kde.org/discover/0ef1323345b9733bfdf295b3f33eef372ad5268b