Bug 1478300 - Regression: software updates known to be non-urgent are shown too frequently
Regression: software updates known to be non-urgent are shown too frequently
Status: NEW
Product: Fedora
Classification: Fedora
Component: gnome-software (Show other bugs)
26
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-04 04:46 EDT by Alan Jenkins
Modified: 2017-09-28 12:42 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Screenshot with update notification (235.13 KB, image/png)
2017-08-04 04:46 EDT, Alan Jenkins
no flags Details
Screenshot of information without update notification (340.14 KB, image/png)
2017-08-04 04:47 EDT, Alan Jenkins
no flags Details
Another non-security update notification on the subsequent day (600.45 KB, image/png)
2017-08-05 03:45 EDT, Alan Jenkins
no flags Details

  None (edit)
Description Alan Jenkins 2017-08-04 04:46:36 EDT
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 04:47 EDT
Created attachment 1308960 [details]
Screenshot of information without update notification
Comment 2 Alan Jenkins 2017-08-05 03:45 EDT
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 07:07:30 EDT
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 12:42:49 EDT
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?

Note You need to log in before you can comment on or make changes to this bug.