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')
|
conf.set('HAVE_POLKIT_0_114', '1')
|
||||||
endif
|
endif
|
||||||
gudev = dependency('gudev-1.0')
|
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')
|
gusb = dependency('gusb', version : '>= 0.2.9')
|
||||||
sqlite = dependency('sqlite3')
|
sqlite = dependency('sqlite3')
|
||||||
libarchive = dependency('libarchive')
|
libarchive = dependency('libarchive')
|
||||||
|
@ -627,7 +627,6 @@ _as_app_get_screenshot_default (AsApp *app)
|
|||||||
return g_ptr_array_index (array, 0);
|
return g_ptr_array_index (array, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if AS_CHECK_VERSION(0,6,7)
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_engine_check_version_requirement (AsApp *app,
|
fu_engine_check_version_requirement (AsApp *app,
|
||||||
AsRequireKind kind,
|
AsRequireKind kind,
|
||||||
@ -665,12 +664,10 @@ fu_engine_check_version_requirement (AsApp *app,
|
|||||||
version, id);
|
version, id);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_engine_check_requirements (AsApp *app, FuDevice *device, GError **error)
|
fu_engine_check_requirements (AsApp *app, FuDevice *device, GError **error)
|
||||||
{
|
{
|
||||||
#if AS_CHECK_VERSION(0,6,7)
|
|
||||||
/* make sure requirements are satisfied */
|
/* make sure requirements are satisfied */
|
||||||
if (!fu_engine_check_version_requirement (app,
|
if (!fu_engine_check_version_requirement (app,
|
||||||
AS_REQUIRE_KIND_ID,
|
AS_REQUIRE_KIND_ID,
|
||||||
@ -703,7 +700,6 @@ fu_engine_check_requirements (AsApp *app, FuDevice *device, GError **error)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* success */
|
/* success */
|
||||||
return TRUE;
|
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");
|
tmp = as_app_get_metadata_item (app, "fwupd::RemoteID");
|
||||||
if (tmp != NULL)
|
if (tmp != NULL)
|
||||||
fu_device_set_update_remote_id (item->device, tmp);
|
fu_device_set_update_remote_id (item->device, tmp);
|
||||||
#if AS_CHECK_VERSION(0,6,1)
|
|
||||||
tmp = as_app_get_unique_id (app);
|
tmp = as_app_get_unique_id (app);
|
||||||
if (tmp != NULL)
|
if (tmp != NULL)
|
||||||
fu_device_set_unique_id (item->device, tmp);
|
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 */
|
/* add release information */
|
||||||
fu_engine_set_release_from_item (fwupd_result_get_release (FWUPD_RESULT (item->device)), release);
|
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_name (rel, as_app_get_name (app, NULL));
|
||||||
fwupd_release_set_summary (rel, as_app_get_comment (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));
|
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));
|
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));
|
fwupd_release_set_appstream_id (rel, as_app_get_id (app));
|
||||||
fu_engine_set_release_from_item (rel, release);
|
fu_engine_set_release_from_item (rel, release);
|
||||||
return g_steal_pointer (&res);
|
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;
|
g_autofree gchar *id2 = NULL;
|
||||||
FwupdResult *res = FWUPD_RESULT (item->device);
|
FwupdResult *res = FWUPD_RESULT (item->device);
|
||||||
FwupdDevice *dev = fwupd_result_get_device (res);
|
FwupdDevice *dev = fwupd_result_get_device (res);
|
||||||
#if AS_CHECK_VERSION(0,6,1)
|
|
||||||
id2 = as_utils_unique_id_build (AS_APP_SCOPE_SYSTEM,
|
id2 = as_utils_unique_id_build (AS_APP_SCOPE_SYSTEM,
|
||||||
AS_BUNDLE_KIND_UNKNOWN,
|
AS_BUNDLE_KIND_UNKNOWN,
|
||||||
NULL,
|
NULL,
|
||||||
AS_APP_KIND_FIRMWARE,
|
AS_APP_KIND_FIRMWARE,
|
||||||
fwupd_device_get_name (dev),
|
fwupd_device_get_name (dev),
|
||||||
fwupd_device_get_version (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);
|
fwupd_result_set_unique_id (res, id2);
|
||||||
}
|
}
|
||||||
return g_object_ref (item->device);
|
return g_object_ref (item->device);
|
||||||
|
@ -71,7 +71,6 @@ fu_hwids_has_guid (FuHwids *self, const gchar *guid)
|
|||||||
static gchar *
|
static gchar *
|
||||||
fu_hwids_get_guid_for_str (const gchar *str, GError **error)
|
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";
|
const gchar *namespace_id = "70ffd812-4c7f-4c7d-0000-000000000000";
|
||||||
glong items_written = 0;
|
glong items_written = 0;
|
||||||
g_autofree gunichar2 *data = NULL;
|
g_autofree gunichar2 *data = NULL;
|
||||||
@ -90,13 +89,6 @@ fu_hwids_get_guid_for_str (const gchar *str, GError **error)
|
|||||||
(guint8*) data,
|
(guint8*) data,
|
||||||
items_written * 2,
|
items_written * 2,
|
||||||
error);
|
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;
|
g_autofree gchar *testdir = NULL;
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
|
|
||||||
#if !AS_CHECK_VERSION(0,6,13)
|
|
||||||
g_test_skip ("appstreaml-glib too old, skipping");
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
const gchar *key;
|
const gchar *key;
|
||||||
const gchar *value;
|
const gchar *value;
|
||||||
|
@ -1686,14 +1686,12 @@ main (int argc, char *argv[])
|
|||||||
/* TRANSLATORS: command description */
|
/* TRANSLATORS: command description */
|
||||||
_("Get all devices that support firmware updates"),
|
_("Get all devices that support firmware updates"),
|
||||||
fu_util_get_devices);
|
fu_util_get_devices);
|
||||||
#if AS_CHECK_VERSION(0,6,13)
|
|
||||||
fu_util_add (priv->cmd_array,
|
fu_util_add (priv->cmd_array,
|
||||||
"hwids",
|
"hwids",
|
||||||
NULL,
|
NULL,
|
||||||
/* TRANSLATORS: command description */
|
/* TRANSLATORS: command description */
|
||||||
_("Return all the hardware IDs for the machine"),
|
_("Return all the hardware IDs for the machine"),
|
||||||
fu_util_hwids);
|
fu_util_hwids);
|
||||||
#endif
|
|
||||||
fu_util_add (priv->cmd_array,
|
fu_util_add (priv->cmd_array,
|
||||||
"install-prepared",
|
"install-prepared",
|
||||||
NULL,
|
NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user