Skip to content
Commit bc594939 authored by Fabiano Fidêncio's avatar Fabiano Fidêncio
Browse files

import: Introduce "--latest" option

--latest option checks whether there's a new osinfo-db available from
the official libosinfo's release website, downloads and install it.

The download and installation is only then when the version available in
libosinfo's release website is newer than the version installed in the
(specified location in) system.

The file we query in order to get the "latest" available version
(https://db.libosinfo.org/latest.json) is a json that looks like:
{
    "version": 1,
    "release": {
        "version": "20181203",
        "archive": "https://releases.pagure.org/libosinfo/osinfo-db-20181203.tar.xz",
        "signature": "https://releases.pagure.org/libosinfo/osinfo-db-20181203.tar.xz.asc

"
    }
}

The file will be automatically updated whenever a new release is done
(in a day interval).

This commit also introduces a new dependency: json-glib, which is used
to easily manipulate the queried file's content.

Signed-off-by: default avatarFabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
parent 976ad41c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment