Bug 509645

Summary: Auto updates do not respect update frequency
Product: [Applications] Discover Reporter: Timothée Ravier <tim>
Component: UpdatesAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: normal CC: aleixpol, nate
Priority: NOR    
Version First Reported In: 6.4.4   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=509760
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Timothée Ravier 2025-09-18 16:38:38 UTC
SUMMARY

On Fedora Kinoite 43, we enabled auto updates and they now work, but they get applied approximately every day while we configured them to be applied weekly.

```
# Default
$ cat /etc/xdg/PlasmaDiscoverUpdates
[Global]
UseUnattendedUpdates=true
RequiredNotificationInterval=604800

# Overridden via the KCM
$ cat ~/.config/PlasmaDiscoverUpdates
[Global]
LastNotificationTime=2025,9,9,18,43,15.643,UTC
LastUnattendedTrigger=2025,9,18,9,29,24.913,UTC
RequiredNotificationInterval=604800
```

604800 is 60*60*24*7, i.e. a week.

STEPS TO REPRODUCE
1. Enable auto-update on a weekly basis
2. Wait a day

OBSERVED RESULT

Updates are applied approximately daily

EXPECTED RESULT

Updates are applied weekly

SOFTWARE/OS VERSIONS

Operating System: Fedora Linux 43
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.16.5-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION

Previous bug that might be related but are already closed and does not look like duplicates:
* https://bugs.kde.org/show_bug.cgi?id=419055
* https://bugs.kde.org/show_bug.cgi?id=466693
* https://bugs.kde.org/show_bug.cgi?id=436927

Vaguely related:
* https://bugs.kde.org/show_bug.cgi?id=454422
Comment 1 Timothée Ravier 2025-09-18 17:32:55 UTC
This is weird. When I'm testing by updating manually the times in `~/.config/PlasmaDiscoverUpdates` to point the the past then updates are not triggered.

```
$ cat ~/.config/PlasmaDiscoverUpdates
[Global]
LastNotificationTime=2025,9,16,17,24,41.867,UTC
LastUnattendedTrigger=2025,9,16,9,29,24.913,UTC
RequiredNotificationInterval=604800

$ QT_LOGGING_RULES=org.kde.plasma.libdiscover.backend.rpm-ostree*=true ; org.kde.plasma.discover.notifier*=true' /var/home/tim/projects/kde/discover/build/tmp/lib64/libexec/DiscoverNotifier --replace
org.kde.plasma.discover.notifier: Not triggering, state is DiscoverNotifier::NoUpdates
org.kde.plasma.discover.notifier: refreshUnattended: not notifying about updates
org.kde.plasma.libdiscover.backend.rpm-ostree: Looking for new deployments in "/ostree/deploy/fedora/deploy/"
org.kde.plasma.libdiscover.backend.rpm-ostree: Looking for ostree format
org.kde.plasma.discover.notifier: updateStatusNotifier: hasUpdates false hasSecurityUpdates false
org.kde.plasma.libdiscover.backend.rpm-ostree: Checking for system update
org.kde.plasma.libdiscover.backend.rpm-ostree: Checking for system update (OCI format)
org.kde.plasma.libdiscover.backend.rpm-ostree: Looking at existing deployments
org.kde.plasma.libdiscover.backend.rpm-ostree: Notifying that a new update is available
org.kde.plasma.discover.notifier: updateStatusNotifier: hasUpdates true hasSecurityUpdates false
org.kde.plasma.discover.notifier: Not triggering, earliestNextTriggerTime is QDateTime(2025-09-24 17:24:41.867 UTC Qt::TimeZone UTC )
org.kde.plasma.discover.notifier: showUpdatesNotification: not notifying about updates
org.kde.plasma.discover.notifier: Not triggering, earliestNextTriggerTime is QDateTime(2025-09-24 09:29:24.913 UTC Qt::TimeZone UTC )
org.kde.plasma.discover.notifier: refreshUnattended: not notifying about updates
```