mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-19 06:11:47 -04:00
RemoteState: Drop cancallable from flatpak_remote_state_lookup_cache()
This is a no-i/o operation on immutable data, there is no need for a cancellable. Closes: #1594 Approved by: alexlarsson
This commit is contained in:
committed by
Atomic Bot
parent
7a61658012
commit
4da56c8c62
@@ -328,7 +328,7 @@ flatpak_builtin_ls_remote (int argc, char **argv, GCancellable *cancellable, GEr
|
||||
|
||||
if (!flatpak_remote_state_lookup_cache (state, ref,
|
||||
&download_size, &installed_size, NULL,
|
||||
NULL, error))
|
||||
error))
|
||||
return FALSE;
|
||||
|
||||
/* The sparse cache is optional */
|
||||
|
||||
@@ -564,7 +564,7 @@ flatpak_transaction_add_ref (FlatpakTransaction *self,
|
||||
|
||||
if (metadata == NULL && remote != NULL)
|
||||
{
|
||||
if (!flatpak_remote_state_lookup_cache (state, ref, NULL, NULL, &metadata, NULL, &local_error))
|
||||
if (!flatpak_remote_state_lookup_cache (state, ref, NULL, NULL, &metadata, &local_error))
|
||||
{
|
||||
g_print (_("Warning: Can't find dependencies: %s\n"), local_error->message);
|
||||
g_clear_error (&local_error);
|
||||
|
||||
@@ -303,7 +303,6 @@ flatpak_remote_state_lookup_cache (FlatpakRemoteState *self,
|
||||
guint64 *download_size,
|
||||
guint64 *installed_size,
|
||||
const char **metadata,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
g_autoptr(GVariant) cache_v = NULL;
|
||||
@@ -10799,7 +10798,7 @@ flatpak_dir_find_remote_related (FlatpakDir *self,
|
||||
|
||||
if (flatpak_remote_state_lookup_cache (state, ref,
|
||||
NULL, NULL, &metadata,
|
||||
NULL, NULL) &&
|
||||
NULL) &&
|
||||
g_key_file_load_from_data (metakey, metadata, -1, 0, NULL))
|
||||
{
|
||||
g_auto(GStrv) groups = NULL;
|
||||
|
||||
@@ -115,7 +115,6 @@ gboolean flatpak_remote_state_lookup_cache (FlatpakRemoteState *self,
|
||||
guint64 *download_size,
|
||||
guint64 *installed_size,
|
||||
const char **metadata,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GVariant *flatpak_remote_state_lookup_sparse_cache (FlatpakRemoteState *self,
|
||||
const char *ref,
|
||||
|
||||
@@ -2047,7 +2047,7 @@ flatpak_installation_fetch_remote_size_sync (FlatpakInstallation *self,
|
||||
|
||||
return flatpak_remote_state_lookup_cache (state, full_ref,
|
||||
download_size, installed_size, NULL,
|
||||
cancellable, error);
|
||||
error);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2088,7 +2088,7 @@ flatpak_installation_fetch_remote_metadata_sync (FlatpakInstallation *self,
|
||||
|
||||
if (!flatpak_remote_state_lookup_cache (state, full_ref,
|
||||
NULL, NULL, &res,
|
||||
cancellable, error))
|
||||
error))
|
||||
return NULL;
|
||||
|
||||
return g_bytes_new (res, strlen (res));
|
||||
|
||||
@@ -338,7 +338,7 @@ flatpak_remote_ref_new (FlatpakCollectionRef *coll_ref,
|
||||
if (state &&
|
||||
!flatpak_remote_state_lookup_cache (state, full_ref,
|
||||
&download_size, &installed_size, &metadata,
|
||||
NULL, NULL))
|
||||
NULL))
|
||||
{
|
||||
g_warning ("Ignoring ref %s due to lack of metadata", full_ref);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user