Bugzilla – Bug 1161036
pk-offline-update reports success despite failed update
Last modified: 2020-11-09 15:14:41 UTC
End user experience:
- Klick "restart and update" in GNOME Software
- Confirm restart
- System boots
- After a few minutes, system boots again
- Logging in and restarting GNOME softwrare, the same list of updates is displayed again, with the same "Restart and Update" button
- This can be repeated
journalctl -b -1 shows this:
> Jan 16 08:37:49 apollon pk-offline-update: status wait
> Jan 16 08:37:49 apollon pk-offline-update: status setup
> Jan 16 08:37:52 apollon pk-offline-update: status finished
> Jan 16 08:37:52 apollon PackageKit: update-packages transaction /1_ebebddca from uid 0 finished with failed after 2901ms
> Jan 16 08:37:52 apollon pk-offline-update: writing failed results
> Jan 16 08:37:52 apollon pk-offline-update: failed to update system: There is no update candidate for post-build-checks-84.88+git>
> Jan 16 08:37:52 apollon systemd: systemd-rfkill.service: Succeeded.
> Jan 16 08:38:02 apollon pk-offline-update: rebooting
> Jan 16 08:38:02 apollon pk-offline-update: sent mode to plymouth 'shutdown'
> Jan 16 08:38:02 apollon pk-offline-update: sent msg to plymouth 'Rebooting after installing updates…'
> Jan 16 08:38:02 apollon systemd: packagekit-offline-update.service: Succeeded.
> Jan 16 08:38:02 apollon systemd: Stopped Update the operating system whilst offline.
So, pk-offline-update returns Success status even though it failed to do the update.
The actual update problem was due to a version "correction" in post-build-checks that would cause the package to be downgraded:
> r95 | dimstar_suse | 2020-01-10 16:47:24 | 7568a213422b18c1c6714e41fb98c0b2 | 84.87+git20200110.2d02f07 | rq762807
> - Update to version 84.87+git20200110.2d02f07:
> * Tweaks to make rpm-ndb build
> * Detect name of coreutils package and don't remove it
> - restore correct version
installed version: 84.88+git20190716.5a0e034-1.1
candidate version: 84.87+git20200110.2d02f07-1.1
I have set "solver.dupAllowDowngrade = true" in zypp.conf.
If I run "zypper dup -D -y --details, I get this:
> The following package is going to be downgraded:
> 84.88+git20190716.5a0e034-1.1 -> 84.87+git20200110.2d02f07-1.1
> 544 packages to upgrade, 1 to downgrade, 10 new, 3 to remove, 1 to change arch.
> Overall download size: 0 B. Already cached: 913.1 MiB. After the operation, additional 281.8 MiB will be used.
> Note: System reboot required.
> Continue? [y/n/v/...? shows all options] (y): y
> Checking for file conflicts: [...........done]
So, zypper handles this situation just fine, and finds no other conflicts.
Arguably the PackageKit zypp plugin should be able to deal with this rather trivial conflict automatically. But that's not my main point: The real problem is that the error didn't propagate to GNOME software, which thus offers the same update again and again, providing no clue to the end user that something went wrong, let alone what it was.
Jonathan, adding you to cc, as you've been working on similar stuff lately.
Hack week perhaps?
I should add that pk-offline-update apparently does create its status file
> apollon:/etc/systemd/system # pkcon offline-status
> Status: Failed
> ErrorDetails:librpmbuild8-188.8.131.52-9.2.x86_64 requires librpm.so.8()(64bit), > but this requirement cannot be provided
(note that this failure is from a different attempt than that described in comment 0. The solution "zypper dup" offers for this case is to remove librpmbuild8-184.108.40.206-9.2.x86_64.
However, the user isn't notified of this failure any way. There seems to be no service checking the contents of the "offline-update-competed" file.
Did you get any notification from GNOME Software saying that update failed? There
should be one from GNOME Software.
There were a few fixes related with this, both in gnome-software and PackageKit.
Please test if this is still valid.
(In reply to Jonathan Kang from comment #4)
> There were a few fixes related with this, both in gnome-software and
> Please test if this is still valid.
Closing for missing new tests after the mentioned changes by Jonathan.
If you can still reproduce the issue, please feel free to re-open it.