Bug 347284 - update notifier gets available updates count wrong
Summary: update notifier gets available updates count wrong
Status: RESOLVED FIXED
Alias: None
Product: muon
Classification: Applications
Component: notifier (show other bugs)
Version: 5.3.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Jonathan Thomas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-06 07:44 UTC by Kenny Duffus
Modified: 2016-03-16 14:50 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenny Duffus 2015-05-06 07:44:51 UTC
The update widget gets the number of available updates wrong for instance this morning it said there were 30 with 9 security yet both apt and muon update manager said there were only 8

The number listed also doesn't seem to always match what /usr/lib/update-notifier/apt-check returns from other users testing

Reproducible: Always

Steps to Reproduce:
1. click on update widget and read number of available updates
2. click on update button and muon update manager says a different number

Actual Results:  
Numbers don't match

Expected Results:  
Numbers do match
Comment 1 Rohan Garg 2015-05-06 07:50:39 UTC
I can confirm this happens to me too, on Utopic though.

> $ /usr/lib/update-notifier/apt-check                                                                                                                                              
247;14%                                                                                                                                                                              

Muon shows 275 updates with 14 security updates.
Comment 2 Kenny Duffus 2015-05-07 12:26:56 UTC
to show that the numbers do change, today was

notifier: 5,1
apt-check: 3,1
actual: 7
Comment 3 gamesh.g 2015-06-04 08:37:23 UTC
I always see "2x packages are available for updates of which x are security updates" and there's only ever x packages to update.
Comment 4 gamesh.g 2015-06-26 07:56:06 UTC
Actually, the above isn't quite correct. It is when there are only security updates, but if there are any other type they can be ignored.

Right now the update widget says "2 packages to update of which 1 are security updates" but when I open muon there are five packages in total to update.
Comment 5 michael 2015-10-22 00:03:15 UTC
On my setup apt-check gets it right but update notifier miss counts the total number of updates. It also doesn't always go away on its own after an update. Turning the notification off and back on triggers it to go away if no updates are available but does not correct the count error.
Comment 6 michael 2015-10-22 22:32:35 UTC
The patch at https://git.reviewboard.kde.org/r/125749/ attempts to address one issue here. Security updates are being double counted.
Comment 7 Aleix Pol 2015-10-22 23:52:12 UTC
Git commit dbf64fc4e07a6ed5eccf16cf116eb8590e5007ea by Aleix Pol.
Committed on 22/10/2015 at 23:47.
Pushed by apol into branch 'Plasma/5.4'.

parseUpdateInfo() does not correctly account for securtity updates
REVIEW: 125749

M  +1    -1    libmuon/backends/ApplicationBackend/ApplicationNotifier.cpp

http://commits.kde.org/muon/dbf64fc4e07a6ed5eccf16cf116eb8590e5007ea
Comment 8 michael 2015-12-08 20:11:23 UTC
Created https://git.reviewboard.kde.org/r/126284. Security updates are now correctly accounted for in MuonNotifier. No more double counting there. On my machine the count can also be lower than the actually package count for non-security updates. I don't know if this is still the case. Now works for me if only security updates are found not yet tested in other cases.
Comment 9 Aleix Pol 2016-03-16 14:50:20 UTC
Git commit ec814134261c282f2513f65f8aa511f10c825d31 by Aleix Pol.
Committed on 16/03/2016 at 14:49.
Pushed by apol into branch 'Plasma/5.6'.

Don't count security updates twice
REVIEW: 126284

M  +1    -1    notifier/DiscoverNotifier.cpp

http://commits.kde.org/discover/ec814134261c282f2513f65f8aa511f10c825d31