Discover system updates still very unreliable

The Manjaro Plasma Mobile images ship with Discover as the default updater. Unfortunately, system updates through Discover (and hence PackageKit) have had several unresolved issues for the last few months (which were already mentioned deep in various threads):

  1. The stale lockfile. Discover will not actually offer any system update at all until you manually run sudo rm /var/lib/PackageKit/alpm/db.lck. I believe this is the only reason you do not get more complaints from desperate beginner-level end users about Discover bricking their systems (see below): they just do not see updates at all. This started some time last year, probably when pacman was upgraded to version 6. In another thread, this was claimed to be fixed. It is not. I had it happen again when updating from the previous stable update to the current one last week.
  2. The incomplete updates. This is definitely the worst issue. Discover/PackageKit just skips updating some core packages, which can leave the system in varying states of brokenness. The fix is to run sudo pacman -Su from the CLI to finish the update (refreshing with -y is normally not even needed), if you even get to run pacman. Once, I had to actually copy a pkg file through USB and install it manually with pacman so that NetworkManager would work, so that pacman was actually able to download updates. As far as I can tell, this issue started later than the other ones, some time this year. (It first happened for me in March when running the last February update, but I had skipped updates since December. But now, even without skipping updates, it happens basically every time.) When I run sudo pacman -Su from the CLI, it first wants to update the keyring packages, and then proceeds to the remaining update, I think this is what PackageKit does not handle correctly. (I suspect that it does not see the keyring updates and then rejects the others due to being signed with an unknown key. But instead of producing a fatal error as it should in such a case, it just silently skips the updates.) But the partial updates can also leave other stuff in varying states of brokenness, e.g., I twice had the issue that GTK applications were no longer able to display their Adwaita icons (because some cache got corrupted when gdk_pixbuf2 failed to load its libraries), and the resolution was different: last time it happened, I had to reinstall adwaita-icon-theme with sudo pacman -S adwaita-icon-theme, this time, I had to sudo gdk-pixbuf-query-loaders --update-cache instead (and each time, the other command had no effect).
  3. The bogus error. This one is a mere annoyance. It happened even when the above issue did not happen, so I believe the error is truly bogus and not PackageKit clumsily trying to report the above to me. Like the first issue, this started some time last year, probably when pacman was upgraded to version 6, and still happened with the latest stable update. After updating, I get a notification from Discover at every boot that the offline update failed until I manually sudo rm /var/lib/PackageKit/offline-update-competed (sic! They really misspelled completed as competed!). The offered resolutions do not work: “Open Discover” just opens the Discover UI that does not provide any way to get rid of the error, and “Repair System” is not implemented on Arch/Manjaro at all. There is no “Dismiss” option to make the popups stop permanently (you can close the popup, but it will come back at the next reboot), and there should not be such an unspecific error coming up at each and every update to begin with.

All in all, this leads to a very broken user experience for system updates.

It is up to the users to maintain the system.
I make system updates on tty2 and login as root.

:sunglasses:

I agree. The libalpm support in Discover is not great. I seem to recall that Discover can’t do the “replace package X with package Y” stuff and such.

For your 3rd point, I made an MR to remove that packagekit-offline.sh script so the error at least does not show any more. Although this disable the concept of offline updates all together.
Points 1 and 2 are not really something we, as a distribution, can do much about as it’s missing functionality in PackageKit and the libalpm Discover backend.