Adding EOL information
- From: Richard Hughes <hughsient gmail com>
- To: gnome-software-list gnome org
- Subject: Adding EOL information
- Date: Sat, 13 May 2017 08:24:03 +0100
Hi all,
I've pushed to master a few patches that add the concept of "current
installed OS" to the plugin loader. This is meant to be used so we can
get the current supported status of the current OS. In the current
implementation, the installed OS is always INSTALLED, but if there are
updates still available for the OS (i.e. it is a supported release)
then a plugin should switch the status to UPDATABLE. In the event the
distro is end-of-life and no longer supported then the status should
be set to UNAVAILABLE.
I've added a simple patch to the dummy backend that allows you to test
the new EOL notification[1]. For Fedora we're querying a remote URI
[2] and getting the supported status of the OS. From an implementation
point of view, the new os-release plugin gives you a metadata item of
GnomeSoftware::CpeName which matches the CPE_NAME in /etc/os-release
-- you can parse that and then match that for your distro.
From an "actually doing it" point of view, you need to:
* find a remote URL you can use to specify a distro release is active/eol
* add a plugin that downloads this file to a cache (e.g.
gs_utils_get_cache_filename+gs_plugin_download_file) when calling
gs_plugin_refresh()
* make sure the plugin has GS_PLUGIN_RULE_RUN_AFTER "os-release"
* add the gs_plugin_refine_app to the new plugin, and match against
anything that has GnomeSoftware::CpeName set
* parse the CPE_NAME and match against the information from the
remote URI. As a side note, we have to use a string-insensitive match
here for Fedora for legacy reasons.
* set the GsApp state to the appropriate value
You can see what I do for Fedora in fedora-pkgdb-collections [3]
although this is also dealing with getting the OS upgrades and looks
more complicated that it needs to be.
Any questions, yell,
Richard
[1] https://git.gnome.org/browse/gnome-software/tree/plugins/dummy/gs-plugin-dummy.c#n544
[2] https://admin.fedoraproject.org/pkgdb/api/collections/
[3]
https://git.gnome.org/browse/gnome-software/tree/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]