Hello everyone,
First message here, so, Hi, this is Dario from the openSUSE community.
What I would like to know (and maybe get some advices about) is whether it already possible to somehow disable offline updates in GNOME Software and have all the packages installed “live”? I’m interested in the PackageKit backend/plugin (for RPMs, FWIW).
And if not, can anyone share any info or pointers to docs or code about how it would be best to implement something like this? I have played a bit with the code, putting there hacks like forcing GS_APP_STATE_UPDATABLE_LIVE for all apps --just as an exercise in order to understand how things work and maybe figure out how to do the job properly-- but I couldn’t get it to work, not even in that way.
The context is that on openSUSE MicroOS, which is an immutable rolling operating system, we will soon have PackageKit working. In fact, something like pkcon update
done in a shell works already. On MicroOS, when wanting to install or update a package, we create a new (or “enter” in one, if it already exists) BTRFS snapshot, and we install/update the package there. At the next reboot, that snapshot is made to be the default one, which means we will have the new/updated package available in it. And, as said, pkcon already does this in the proper way, so from the “backend” perspective, I’d say we’re good.
As you probably understand, in such a system the problem of “live updates” does not exist, as the snapshot where we do the change is never the one that is actually running. Therefore, we never update the packages in the snapshot that is our current rootfs, which means that we do not need offline updates at all. So, in my mind, our case could be handled just fine by having GNOME Software thinking that it can use what it calls “live update” for all the packages (that’s what I mean when I say “disable offline-updates”). That would trigger (I think?) a regular PackageKit update which, however, since it knows that it is running on MicroOS, it will only alter the new snapshot. After that, the user will get his/hers updates after the next reboot already, i.e., all the systemd-update dance, which makes a lot of sense in general, is just useless for us.
What we were looking for is something like a gsettings key (but of course we’re open for suggestions!) for disabling offline-update mode and make GNOME Software work in “live update” mode only. Is there anything that allows to do that already? If yes, can anyone point me to it? Because I looked but did not find it. If no, I’d appreciate some thoughts and directions on how to start implementing it.
Of course, we’ll be fine with such a key being default off (i.e., default remains offline updates) and hidden so that users cannot mess with it and shot themselves in the foot on non-immutable systems.
Thanks a lot in advance and Regards
Dario