Bug 2026108 - Background updates never trigger
Summary: Background updates never trigger
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-software
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Milan Crha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-23 19:10 UTC by iolo
Modified: 2021-12-13 08:30 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-12-13 08:30:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description iolo 2021-11-23 19:10:39 UTC
Description of problem:
I have the automatic updates option selected in Gnome Software's settings, but the only time this actually works is after the very first boot after installing Fedora 35 Workstation. Subsequently, while there may be notifications about updates being available, they are never downloaded in the background, and the shutdown prompt never offers the checkbox for installing updates.

Version-Release number of selected component (if applicable):
41.1-1.fc35

How reproducible:
Always

Steps to Reproduce:
1. Install Fedora 35 Workstation and then install the first set of updates
2. Keep using the machine and observe that updates are never downloaded in the background

Actual results:
Updates are not downloaded in the background

Expected results:
Updates are downloaded in the background in accordance with the setting in Gnome Software's settings menu, and a checkbox is made available in the Gnome shutdown prompt for installing the updates before shutting down.

Additional info:

Comment 1 Milan Crha 2021-11-24 08:59:30 UTC
Thanks for a bug report. This should be covered by:
https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1114

but it is part of your 41.1 release.

When you open the Software and select the Updates page, is there a "Requires Restart" section? Id it is, what button is shown above that section, "Download" or "Restart & Update", please.

All of this depends on the PacakgeKit, including the checkbox you mentioned on the system restart/shutdown dialog. The checkbox is shown only if the PackageKit has prepared updates. That's recognized by an existence of a /var/lib/PackageKit/prepared-update file.

The updates are auto-downloaded once per 14 days [1], unless there are new security updates. I noticed some flaw in that security update code, but it should not be related.

You might be also interested in https://pagure.io/fedora-workstation/issue/107

[1] per the new design at https://gitlab.gnome.org/Teams/Design/software-mockups/-/blob/master/updates-logic.png

Comment 2 Milan Crha 2021-11-24 09:57:32 UTC
I tried to debug it here and it seems to do the right thing. Could you execute the below commands in a terminal and paste here  the output of each of them, please?

   gsettings get org.gnome.software download-updates
   gsettings get org.gnome.software check-timestamp
   gsettings get org.gnome.software install-timestamp
   gsettings get org.gnome.software update-notification-timestamp
   gsettings get org.gnome.software security-timestamp

For the record, I opened https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/1103 , but it worked properly here without that change too.

I suspect whether the PackageKit works properly for you. Could you open the terminal, then run it it:

   $ gnome-software --quit

and make sure it did quit, by calling `ps ax | grep gnome-software`, which should not mention the gnome-software itself. Then run gnome-software from this terminal:

   $ gnome-software

and see whether it'll print any runtime warning related to the updates. You can also use a --verbose argument, to get a lot of debugging information. Ideally set the check-timestamp to a past date, like:

   $ gsettings set org.gnome.software check-timestamp 0

thus the gnome-software will check for new updates one minute after its start, if it's not before 6AM. Otherwise it'll check for new updates only after an hour.

Comment 3 iolo 2021-11-27 16:23:39 UTC
Hi, sorry for not getting back to you on this sooner.

>When you open the Software and select the Updates page, is there a "Requires Restart" section? Id it is, what button is shown above that section, "Download" or "Restart & Update", please.

Yes there is, and the button says Download.

>The updates are auto-downloaded once per 14 days [1], unless there are new security updates. I noticed some flaw in that security update code, but it should not be related.

Interesting. I think I waited precisely 14 days before I updated manually, thinking that it doesn't work, so it could be this that explains the behavior. However, in that 14 days I did see notifications about "critical" updates, and those did not download automatically either. I don't know if those count as security updates though.

>I tried to debug it here and it seems to do the right thing. Could you execute the below commands in a terminal and paste here  the output of each of them, please?

It will probably not be of much use now that I have updated manually, but here it is:

gsettings get org.gnome.software download-updates
true

gsettings get org.gnome.software check-timestamp
int64 1638026492

gsettings get org.gnome.software install-timestamp
int64 1637753738

gsettings get org.gnome.software update-notification-timestamp
int64 1638026494

gsettings get org.gnome.software security-timestamp
int64 0







I think that before going much further, I will once more wait for two weeks and a day without updating and see if that changes anything. I will let you know, and if that is the case, I'm sorry for the needless bug report. I don't suppose it would be possible to add a small mention of the 14 day period somewhere near the relevant setting in Gnome Software, or would that be more of an upstream matter? I wouldn't have expected such a limit to be more than one week, I was taken by surprise here.

Comment 4 Milan Crha 2021-11-29 07:20:30 UTC
(In reply to iolo from comment #3)
> Hi, sorry for not getting back to you on this sooner.

No problem at all.

> Yes there is, and the button says Download.

Good. It can be the packages are downloaded, but the prepared-update file is missing, as I mentioned earlier.

> However, in that 14 days I did see notifications about "critical"
> updates, and those did not download automatically either. I don't know if
> those count as security updates though.

The critical updates are important, thus they do count, though before the https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/1103 it was not considered as such properly. That's for 41.2+.

Decoded times:
 * check-timestamp - Sat Nov 27 04:21:32 PM CET 2021
 * install-timestamp - Wed Nov 24 12:35:38 PM CET 2021
 * update-notification-timestamp - Sat Nov 27 04:21:34 PM CET 2021

Which means that 14 days after Nov 24 the updates will be downloaded and you'll be notified to install them every 3 days.

> If that is the case, I'm sorry for the needless bug report.

No problem. I agree the change in the design is confusing. The code is still updated, because not being caught properly, too.

> I don't suppose it would be possible to add a small mention of the 14 day
> period somewhere near the relevant setting in Gnome Software, or would that
> be more of an upstream matter? I wouldn't have expected such a limit to be
> more than one week, I was taken by surprise here.

Yes, it's an upstream matter, not a Fedora thing, but I do not believe a notice in the GSettings would make any sense. That's the place where users can do low-level things, it's not the place where regular users should do anything. Not talking when the design changes it could be easily forgotten to update also a GSettings key description appropriately.

Comment 5 iolo 2021-12-10 17:20:14 UTC
I'm happy to report that after 14 days the updates did indeed get downloaded automatically in the background, and I was able to install them by leaving the checkbox ticked when I shut my computer down, so this report was unnecessary. Sorry about that.

>Yes, it's an upstream matter, not a Fedora thing, but I do not believe a notice in the GSettings would make any sense.

When I was referring to settings, I meant the settings menu inside Gnome Software, where you can toggle automatic updates on and off, but I suppose it's an upstream matter either way.

Comment 6 Milan Crha 2021-12-13 08:30:01 UTC
Thanks for the confirmation. I'm closing this.


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