Re: Integration with gnome-software



Hi, I'm hardly the expert, so Colin feel free to correct me where i am wrong.

On 03/24/2016 02:39 PM, Richard Hughes wrote:
Hi all,

I'm building a plugin for gnome-software so we can do system upgrades
of an atomic workstation for Fedora 25 (using rpm-ostree). GNOME
Software (and the desktop generally) has some quite different
requirements compared to the cloud image and so I wanted to ask for
help before I jumped right in.

I'd appreciate some advice on how to do the following:

* List the user-visible name for the remote, i.e. something like
"Fedora Workstation" rather than just the ID from
ostree_repo_remote_list(). If this isn't available anywhere we can
just hardcode something (e.g. fedora-atomic-workstation -> _("Fedora
Workstation")) but I know xdg-app has something like this in the
summary file.


This concept isn't consistently implemented yet.

* Get the *default* remote for the system (this is just the first in
the list, right?)

The default remote is based on the current default deployment. If you are using rpm-ostree dbus it's in the Deployment tuple.

* Get the packages installed that make up the currently running system
(e.g. kernel-1.2.3, glibc-1.3.2, gnome-shell-3.20.0) -- using rpm
would be fine of course, but wouldn't be an awesome dep and it would
be much more awesome to just query a daemon or read a file.

AFAIK, you can use the rpm-ostree library to get this. https://github.com/projectatomic/rpm-ostree/tree/master/src/lib but that also has the rpm dependencies.


* Download all the required commits for the newest version of a
specific remote *without* actually committing (so we can download when
the session is idle) -- also with progress and cancellability (we
auto-cancel the background download if the session goes non-idle).

AFAIK, the rpm-ostree dbus api does not currently support this, but can be done using the ostree library directly. The dbus api only supports downloading the rpm directory so that you can preview what changes will be made. But it doesn't download the whole file tree.

* Display all the package names of all the updates in the
downloaded-but-not-staged commits (so we can ask the user to show the
update info in the UI) - hiding anything that's not been downloaded.

This can be done with the DownloadDeployRpmDiff / GetCachedDeployRpmDiff and DownloadUpdateRpmDiff / GetCachedUpdateRpmDiff dbus methods.

* Rebase *without* actually rebooting automatically (note: we'd need
progress notifications and cancellability if this is going to take
more than a couple of seconds)

If using the dbus api, all the deploy methods only reboot if passed the reboot option.

gnome-software isn't running privileged, and so any root-requiring
actions would need to go through rpm-ostreed. Any help welcome,
thanks.

Richard
_______________________________________________
ostree-list mailing list
ostree-list gnome org
https://mail.gnome.org/mailman/listinfo/ostree-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]