Bug 389072 - "Check for Updates" button in "Settings" is disabled and sidebar shows "Checking for updates" all the time
Summary: "Check for Updates" button in "Settings" is disabled and sidebar shows "Check...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Updates (interactive) (show other bugs)
Version: 5.11.95
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
: 390840 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-01-16 21:31 UTC by Patrick Silva
Modified: 2018-02-22 08:40 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.12.3


Attachments
screenshot (209.35 KB, image/png)
2018-01-17 14:36 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2018-01-16 21:31:08 UTC
Summary says by itself.
I'm testing plasma 5.12 beta on Arch Linux.
Comment 1 Aleix Pol 2018-01-17 14:18:49 UTC
Try running pkmon and see what state PackageKit is in? I haven't seen this, could it be that it's just slowly downloading the updates? (i.e. pacman -Sy)
Comment 2 Patrick Silva 2018-01-17 14:36:48 UTC
Created attachment 109936 [details]
screenshot

See the screenshot please.
Comment 3 Aleix Pol 2018-01-19 11:46:49 UTC
I'm not calling you a liar, I need to understand the nature of the issue to be able to provide fixes.

Please provide the information I requested.
Comment 4 Patrick Silva 2018-01-19 12:39:18 UTC
What information?
My screenshot shows pkmon result.
Updates download speed is fast, the bug described here occurs all the time, even when no update is found by "pacman -Syu" command.
Comment 5 Aleix Pol 2018-01-19 19:47:17 UTC
You will have to open pkmon before opening discover:
$ pkmon
$ plasma-discover

Another thing to try is to call:
plasma-discover --backends packagekit-backend

To make sure it's PK that is failing and not others.
Comment 6 Patrick Silva 2018-01-19 20:34:57 UTC
here is pkmon output

Transactions:
 [none]
daemon connected=1
network status=online
Transactions:
 1      /2_dddcaccb
Transactions:
 [none]
/2_dddcaccb     allow_cancel 1
/2_dddcaccb     percentage   -1
/2_dddcaccb     role         get-repo-list
/2_dddcaccb     status       finished
Transactions:
 1      /3_adeebdba
Transactions:
 1      /3_adeebdba
 2      /4_bdadabea
Transactions:
 1      /3_adeebdba
 2      /4_bdadabea
 3      /5_baecdbee
/3_adeebdba     allow_cancel 1
/3_adeebdba     percentage   -1
/3_adeebdba     role         resolve
/3_adeebdba     status       query
/4_bdadabea     allow_cancel 1
/4_bdadabea     percentage   -1
/4_bdadabea     role         resolve
/4_bdadabea     status       wait
/5_baecdbee     allow_cancel 1
/5_baecdbee     percentage   -1
/5_baecdbee     role         get-updates
/5_baecdbee     status       wait
/3_adeebdba     status       finished
Transactions:
 1      /4_bdadabea
 2      /5_baecdbee
/4_bdadabea     status       setup
/3_adeebdba     exit code: success
/4_bdadabea     status       query
/4_bdadabea     status       finished
Transactions:
 1      /5_baecdbee
/5_baecdbee     status       setup
/5_baecdbee     status       query
/5_baecdbee     status       download-packagelist
/4_bdadabea     exit code: success
/5_baecdbee     percentage   16
/5_baecdbee     percentage   33
/5_baecdbee     percentage   50
/5_baecdbee     percentage   66
/5_baecdbee     percentage   83
/5_baecdbee     percentage   84
/5_baecdbee     percentage   85
/5_baecdbee     percentage   86
/5_baecdbee     percentage   87
/5_baecdbee     percentage   88
/5_baecdbee     percentage   89
/5_baecdbee     percentage   90
/5_baecdbee     percentage   91
/5_baecdbee     percentage   92
/5_baecdbee     percentage   93
/5_baecdbee     percentage   94
/5_baecdbee     percentage   95
/5_baecdbee     percentage   96
/5_baecdbee     percentage   97
/5_baecdbee     percentage   98
/5_baecdbee     percentage   99
/5_baecdbee     percentage   100
/5_baecdbee     status       finished
/5_baecdbee     exit code: success
Transactions:
 [none]
Comment 7 Patrick Silva 2018-01-19 20:36:18 UTC
plasma-discover --backends packagekit-backend
Using Wayland-EGL
Using the 'xdg-shell-v6' shell integration
setting currentApplicationBackend PackageKitBackend(0x55f8177d2510)
no packages for ""
Comment 8 Aleix Pol 2018-01-19 21:04:02 UTC
When forcing only packagekit-backend, do you still have the issue?
Comment 9 Patrick Silva 2018-01-19 22:02:34 UTC
discover started with
plasma-discover --backends packagekit-backend

is not affected by the issue described here.

I just noticed that discover is also affected on neon dev unstable if packagekit is not forced.
Comment 10 Aleix Pol 2018-01-20 01:36:06 UTC
Interesting!

Could you try it with the other backends?
 * flatpak-backend
 * dummy-backend
 * kns-backend
 * snap-backend
 * packagekit-backend

I've really never seen this issue...
Comment 11 Antonio Rojas 2018-01-20 10:05:32 UTC
flatpak, dummy, packagekit -> enabled
kns -> disabled
Comment 12 Patrick Silva 2018-01-20 14:04:22 UTC
my results

 * flatpak-backend - no problem
 * dummy-backend - discover shows no package
 * kns-backend - the problem described here occurs
 * snap-backend - discover shows no package
 * packagekit-backend - no problem
Comment 13 Aleix Pol 2018-01-29 16:44:32 UTC
Git commit cb492acc1de9840e5f7bd55bdfd492355c6cb01c by Aleix Pol.
Committed on 29/01/2018 at 16:44.
Pushed by apol into branch 'Plasma/5.12'.

Don't let the fact that a backend is fetching block all backends

M  +2    -4    libdiscover/resources/ResourcesModel.cpp

https://commits.kde.org/discover/cb492acc1de9840e5f7bd55bdfd492355c6cb01c
Comment 14 Patrick Silva 2018-02-08 13:51:25 UTC
problem described here is still happening on Arch Linux, discover 5.12.
Comment 15 Antonio Rojas 2018-02-09 07:18:32 UTC
(In reply to Dr. Chapatin from comment #14)
> problem described here is still happening on Arch Linux, discover 5.12.

Which problem? For me the "Check for updates" button is now enabled, but the sidebar still always shows "Checking for updates"
Comment 16 Patrick Silva 2018-02-09 13:04:06 UTC
(In reply to Antonio Rojas from comment #15)
> (In reply to Dr. Chapatin from comment #14)
> > problem described here is still happening on Arch Linux, discover 5.12.
> 
> Which problem? For me the "Check for updates" button is now enabled, but the
> sidebar still always shows "Checking for updates"

Sorry, situation is a bit different now.
Sidebar still always shows "Checking for updates", "Check for updates" button is enabled but nothing happens when clicked.
Comment 17 Aleix Pol 2018-02-21 15:36:35 UTC
*** Bug 390840 has been marked as a duplicate of this bug. ***
Comment 18 Aleix Pol 2018-02-21 15:47:50 UTC
commit 83cde4f08fab5ac4c32f0bbeea8a306bbece1353
Author: Aleix Pol <aleixpol@kde.org>
Date:   Wed Feb 21 16:33:16 2018 +0100

    Also mark as not fetching after fetching updates
    
    Otherwise the UI keeps wanting to check updates
    
    BUG: 389072
Comment 19 Aleix Pol 2018-02-22 08:40:02 UTC
Git commit 83cde4f08fab5ac4c32f0bbeea8a306bbece1353 by Aleix Pol.
Committed on 21/02/2018 at 15:33.
Pushed by apol into branch 'Plasma/5.12'.

Also mark as not fetching after fetching updates

Otherwise the UI keeps wanting to check updates

M  +1    -0    libdiscover/backends/KNSBackend/KNSBackend.cpp
M  +3    -0    libdiscover/backends/KNSBackend/tests/KNSBackendTest.cpp

https://commits.kde.org/discover/83cde4f08fab5ac4c32f0bbeea8a306bbece1353