Bug 1478300

Summary: Regression: software updates known to be non-urgent are shown too frequently
Product: [Fedora] Fedora Reporter: Alan Jenkins <alan.christopher.jenkins>
Component: gnome-softwareAssignee: Richard Hughes <rhughes>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: klember, rhughes
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-29 11:50:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot with update notification
none
Screenshot of information without update notification
none
Another non-security update notification on the subsequent day none

Description Alan Jenkins 2017-08-04 08:46:36 UTC
Created attachment 1308959 [details]
Screenshot with update notification

Description of problem:

GNOME Software is coded to aggregate non-urgent software updates and aggregate them over a period of one week.  This is intended to prevent user fatigue, so that they do not delay applying urgent, security updates.

https://git.gnome.org/browse/gnome-software/tree/src/gs-update-monitor.c?h=gnome-3-24#n195

This is not happening for some reason.  See attached screenshots.


Version-Release number of selected component (if applicable):

gnome-software-3.24.3-1.fc26.x86_64
PackageKit-1.1.6-2.fc26.x86_64
libdnf-0.9.3-1.fc26.x86_64


How reproducible:
I noticed I was getting updates more frequently than usual.  I'm afraid reproducing this independent of repos and real time is beyond my knowledge.


Steps to Reproduce:
1. observe update notifications more frequent than 1/week
2. each time, check `sudo dnf --refresh updateinfo list updates` to see if any are security updates
3. if you suspect a violation, you will also need to check the update release dates.  See https://www.spinics.net/lists/fedora-package-announce/
4. double-check last update date using `sudo journalctl --since=-1week | grep -i pk-offline-update`

Actual results:

1. attached screenshots
2.

# sudo dnf clean all
34 files removed

# dnf --refresh updateinfo list updates
Fedora 26 - x86_64 - Updates                                                                                           13 MB/s | 9.4 MB     00:00    
Fedora 26 - x86_64                                                                                                     10 MB/s |  53 MB     00:05    
local-google-chrome                                                                                                    65 kB/s | 3.8 kB     00:00    
RPM Fusion for Fedora 26 - Free - Updates                                                                             147 kB/s | 157 kB     00:01    
RPM Fusion for Fedora 26 - Free                                                                                       1.0 MB/s | 519 kB     00:00    
Last metadata expiration check: 0:00:00 ago on Fri 04 Aug 2017 09:43:18 BST.
FEDORA-2017-6dd3daf830 bugfix gedit-2:3.22.1-1.fc26.x86_64
FEDORA-2017-02aafa240a bugfix libidn2-2.0.3-1.fc26.x86_64

# journalctl --since=-1week | grep -i pk-offline-update
...
Aug 03 08:31:28 alan-laptop pk-offline-update[762]: sent msg to plymouth 'Shutting down after installing updates…'

libidn2 update date: https://www.spinics.net/lists/fedora-package-announce/msg221443.html
gedit update date: https://www.spinics.net/lists/fedora-package-announce/msg221442.html


Expected results:

If update notifications arrive more frequently than 1/week, dnf should be showing security updates.

Comment 1 Alan Jenkins 2017-08-04 08:47:28 UTC
Created attachment 1308960 [details]
Screenshot of information without update notification

Comment 2 Alan Jenkins 2017-08-05 07:45:05 UTC
Created attachment 1309295 [details]
Another non-security update notification on the subsequent day

This happened again the next day.

# updateinfo list
Fedora 26 - x86_64 - Updates                    8.4 MB/s | 9.4 MB     00:01    
Last metadata expiration check: 0:00:02 ago on Sat 05 Aug 2017 08:36:54 BST.
FEDORA-2017-d6c7c13aa1 bugfix file-5.30-8.fc26.x86_64
FEDORA-2017-d6c7c13aa1 bugfix file-libs-5.30-8.fc26.x86_64
FEDORA-2017-0dd79e9cf5 bugfix rubygem-rdoc-5.1.0-2.fc26.noarch

# pkcon get-updates
Getting updates               [=========================]         
Finished                      [=========================]         
Available   	file-5.30-8.fc26.x86_64 (updates)                           	A utility for determining file types
Available   	file-libs-5.30-8.fc26.x86_64 (updates)                      	Libraries for applications using libmagic
Available   	rubygem-rdoc-5.1.0-2.fc26.noarch (updates)                  	RDoc produces HTML and command-line documentation for Ruby projects

Comment 3 Alan Jenkins 2017-08-22 11:07:30 UTC
And again today.

$ sudo journalctl --since=-1week | grep -i pk-offline-update
Aug 21 09:03:23 alan-laptop pk-offline-update[760]: sent msg to plymouth 'Shutting down after installing updates…'

Interestingly, in confirming the problem further, I get a rough date for when this stopped working :).

$ dconf read /org/gnome/software/install-timestamp
int64 1500846015

$ date --date=@1500846015
Sun 23 Jul 22:40:15 BST 2017

Comment 4 Alan Jenkins 2017-09-28 16:42:49 UTC
Huh.  The stored data has been bumped now

$ dconf read /org/gnome/software/install-timestamp
int64 1505502744
$ date --date=@1505502744
Fri 15 Sep 20:12:24 BST 2017

but not to the most recent update

$ journalctl --since=-1d | grep -i pk-offline-update | tail -n 1
Sep 28 16:42:46 alan-laptop pk-offline-update[765]: sent msg to plymouth 'Rebooting after installing updates…'

Naturally enough I didn't get the "updates have been installed" notification after the reboot, either.

Logs for the 15th show pk-offline-update like before.

Hmm, looking at the code:

	/* have we notified about this before */
	app = gs_app_list_index (apps, 0);
	g_settings_get (monitor->settings,
			"install-timestamp", "x", &time_last_notified);
	if (time_last_notified >= gs_app_get_install_date (app))
		return;
        ...
        	g_settings_set (monitor->settings,
			"install-timestamp", "x", gs_app_get_install_date (app));
}


Apparenty GS switched from checking the PK offline update mtime, to checking the install time of the app with index 0.  But app 0 might not have been part of the last update, right?

Comment 5 Fedora End Of Life 2018-05-03 08:25:47 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2018-05-29 11:50:53 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.