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:Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
Loading