mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 13:59:15 +00:00
trivial: Bump the appstream-glib requirement to 0.6.13
This commit is contained in:
parent
f6f72a439e
commit
0724d8bde0
@ -125,7 +125,7 @@ if polkit.version().version_compare('>= 0.114')
|
||||
conf.set('HAVE_POLKIT_0_114', '1')
|
||||
endif
|
||||
gudev = dependency('gudev-1.0')
|
||||
appstream_glib = dependency('appstream-glib', version : '>= 0.6.9')
|
||||
appstream_glib = dependency('appstream-glib', version : '>= 0.6.13')
|
||||
gusb = dependency('gusb', version : '>= 0.2.9')
|
||||
sqlite = dependency('sqlite3')
|
||||
libarchive = dependency('libarchive')
|
||||
|
@ -627,7 +627,6 @@ _as_app_get_screenshot_default (AsApp *app)
|
||||
return g_ptr_array_index (array, 0);
|
||||
}
|
||||
|
||||
#if AS_CHECK_VERSION(0,6,7)
|
||||
static gboolean
|
||||
fu_engine_check_version_requirement (AsApp *app,
|
||||
AsRequireKind kind,
|
||||
@ -665,12 +664,10 @@ fu_engine_check_version_requirement (AsApp *app,
|
||||
version, id);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
fu_engine_check_requirements (AsApp *app, FuDevice *device, GError **error)
|
||||
{
|
||||
#if AS_CHECK_VERSION(0,6,7)
|
||||
/* make sure requirements are satisfied */
|
||||
if (!fu_engine_check_version_requirement (app,
|
||||
AS_REQUIRE_KIND_ID,
|
||||
@ -703,7 +700,6 @@ fu_engine_check_requirements (AsApp *app, FuDevice *device, GError **error)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* success */
|
||||
return TRUE;
|
||||
@ -1541,13 +1537,9 @@ fu_engine_get_updates_item_update (FuEngine *self, FuDeviceItem *item)
|
||||
tmp = as_app_get_metadata_item (app, "fwupd::RemoteID");
|
||||
if (tmp != NULL)
|
||||
fu_device_set_update_remote_id (item->device, tmp);
|
||||
#if AS_CHECK_VERSION(0,6,1)
|
||||
tmp = as_app_get_unique_id (app);
|
||||
if (tmp != NULL)
|
||||
fu_device_set_unique_id (item->device, tmp);
|
||||
#else
|
||||
fu_device_set_unique_id (item->device, as_app_get_id (app));
|
||||
#endif
|
||||
|
||||
/* add release information */
|
||||
fu_engine_set_release_from_item (fwupd_result_get_release (FWUPD_RESULT (item->device)), release);
|
||||
@ -1700,11 +1692,7 @@ fu_engine_get_result_from_app (FuEngine *self, AsApp *app, GError **error)
|
||||
fwupd_release_set_name (rel, as_app_get_name (app, NULL));
|
||||
fwupd_release_set_summary (rel, as_app_get_comment (app, NULL));
|
||||
fwupd_release_set_vendor (rel, as_app_get_developer_name (app, NULL));
|
||||
#if AS_CHECK_VERSION(0,6,1)
|
||||
fwupd_result_set_unique_id (res, as_app_get_unique_id (app));
|
||||
#else
|
||||
fwupd_result_set_unique_id (res, as_app_get_id (app));
|
||||
#endif
|
||||
fwupd_release_set_appstream_id (rel, as_app_get_id (app));
|
||||
fu_engine_set_release_from_item (rel, release);
|
||||
return g_steal_pointer (&res);
|
||||
@ -1982,18 +1970,12 @@ fu_engine_get_results (FuEngine *self, const gchar *device_id, GError **error)
|
||||
g_autofree gchar *id2 = NULL;
|
||||
FwupdResult *res = FWUPD_RESULT (item->device);
|
||||
FwupdDevice *dev = fwupd_result_get_device (res);
|
||||
#if AS_CHECK_VERSION(0,6,1)
|
||||
id2 = as_utils_unique_id_build (AS_APP_SCOPE_SYSTEM,
|
||||
AS_BUNDLE_KIND_UNKNOWN,
|
||||
NULL,
|
||||
AS_APP_KIND_FIRMWARE,
|
||||
fwupd_device_get_name (dev),
|
||||
fwupd_device_get_version (dev));
|
||||
#else
|
||||
id2 = g_strdup_printf ("system/*/*/firmware/%s/%s",
|
||||
fwupd_device_get_name (dev),
|
||||
fwupd_device_get_version (dev));
|
||||
#endif
|
||||
fwupd_result_set_unique_id (res, id2);
|
||||
}
|
||||
return g_object_ref (item->device);
|
||||
|
@ -71,7 +71,6 @@ fu_hwids_has_guid (FuHwids *self, const gchar *guid)
|
||||
static gchar *
|
||||
fu_hwids_get_guid_for_str (const gchar *str, GError **error)
|
||||
{
|
||||
#if AS_CHECK_VERSION(0,6,13)
|
||||
const gchar *namespace_id = "70ffd812-4c7f-4c7d-0000-000000000000";
|
||||
glong items_written = 0;
|
||||
g_autofree gunichar2 *data = NULL;
|
||||
@ -90,13 +89,6 @@ fu_hwids_get_guid_for_str (const gchar *str, GError **error)
|
||||
(guint8*) data,
|
||||
items_written * 2,
|
||||
error);
|
||||
#else
|
||||
g_set_error_literal (error,
|
||||
G_IO_ERROR,
|
||||
G_IO_ERROR_NOT_SUPPORTED,
|
||||
"libappstream-glib 0.6.13 is required");
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -43,11 +43,6 @@ fu_hwids_func (void)
|
||||
g_autofree gchar *testdir = NULL;
|
||||
gboolean ret;
|
||||
|
||||
#if !AS_CHECK_VERSION(0,6,13)
|
||||
g_test_skip ("appstreaml-glib too old, skipping");
|
||||
return;
|
||||
#endif
|
||||
|
||||
struct {
|
||||
const gchar *key;
|
||||
const gchar *value;
|
||||
|
@ -1686,14 +1686,12 @@ main (int argc, char *argv[])
|
||||
/* TRANSLATORS: command description */
|
||||
_("Get all devices that support firmware updates"),
|
||||
fu_util_get_devices);
|
||||
#if AS_CHECK_VERSION(0,6,13)
|
||||
fu_util_add (priv->cmd_array,
|
||||
"hwids",
|
||||
NULL,
|
||||
/* TRANSLATORS: command description */
|
||||
_("Return all the hardware IDs for the machine"),
|
||||
fu_util_hwids);
|
||||
#endif
|
||||
fu_util_add (priv->cmd_array,
|
||||
"install-prepared",
|
||||
NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user