Bug 419055 - Discover checks for updates daily, regardless of the frequency set in the Software Sources dialog.
Summary: Discover checks for updates daily, regardless of the frequency set in the Sof...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Notifier (show other bugs)
Version: 5.16.5
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks: 466693
  Show dependency treegraph
 
Reported: 2020-03-20 18:12 UTC by Eli Acherkan
Modified: 2023-08-03 15:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.19.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eli Acherkan 2020-03-20 18:12:26 UTC
SUMMARY
Even when the user sets a lower frequency of automatic updates (e.g. weekly) in the Software Sources dialog, Discover nevertheless checks for updates daily. This means that effectively the user has no control over automatic update frequency.

STEPS TO REPRODUCE
1. In Discover, click on "Sources" -> "Software Sources". Provide the password if required.
2. In the "Software Sources" dialog that opens, click on "Updates". Make sure the "Check for updates" checkbox is checked, and choose a frequency other than "Daily" (e.g. "Weekly") in the corresponding dropdown. Click on "Close".

OBSERVED RESULT
Update notifications appear in the notifications area multiple times a week.

EXPECTED RESULT
Update notifications appear at most once a week.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 19.10
(available in About System)
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.4

ADDITIONAL INFORMATION
This is a follow up to bug 401810 (Phabricator patch D17375) and bug 337752. Unfortunately, it appears that the issue wasn't resolved (at least not on my system).

My analysis shows that Discover's PackageKitNotifier attempts to check the frequency set in software-properties by running "apt-config dump" and looking for the "Apt::Periodic::Update-Package-Lists" property in its output. However, on my system the property name starts with uppercase "APT" rather than "Apt", and ends with a semicolon. Therefore PackageKitNotifier fails to find the correct property value, and falls back to the default of a daily check.
Comment 1 Eli Acherkan 2020-03-20 18:21:57 UTC
Proposed fix: https://phabricator.kde.org/D28167
Comment 2 Aleix Pol 2020-03-23 12:05:23 UTC
Git commit 76fcc0ecf29eabe52bfcc5c1cdb13a421bba46f1 by Aleix Pol.
Committed on 23/03/2020 at 12:05.
Pushed by apol into branch 'master'.

packagekit: Fix checking of APT::Periodic::Update-Package-Lists

Summary:

Currently `PackageKitNotifier` attempts to check the frequency by running `apt-config dump` and looking for the `Apt::Periodic::Update-Package-Lists` property in its output. However, on my system the property name starts with uppercase `APT` rather than `Apt`, and ends with a semicolon.

This patch is a defensive, backward-compatible fix. It assumes that under some circumstances the previous code was correct to look for `Apt` and no ending semicolon. To cover both cases, I edited the regexp to allow for an optional semicolon, and to make the comparison case-insensitive.

Reviewers: #discover_software_store, apol, ngraham

Reviewed By: #discover_software_store, apol

Subscribers: plasma-devel

Tags: #plasma, #discover_software_store

Differential Revision: https://phabricator.kde.org/D28167

M  +1    -1    libdiscover/backends/PackageKitBackend/PackageKitNotifier.cpp

https://commits.kde.org/discover/76fcc0ecf29eabe52bfcc5c1cdb13a421bba46f1
Comment 3 Alexey 2023-08-03 08:49:26 UTC
I have the same bug on my system:
Discover 5.27.6
Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Kernel Version: 6.4.6-200.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × 11th Gen Intel® Core™ i7-11800H @ 2.30GHz
Memory: 31,0 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: Micro-Star International Co., Ltd.
Product Name: Creator Z16 A11UE
System Version: REV:1.0
Comment 4 Nate Graham 2023-08-03 15:26:40 UTC
Please do not re-open old bug reports. New issues generally have different root causes, so re-opening an old bug report just confuses everyone. And there is already a new one tracking the issue; see Bug 466693.