Print a warning if the remote metadata cache is not found

This commit is contained in:
Alexander Larsson committed 2017-01-12 10:45:44 +01:00
1 parent 1dc4701404
commit 4e1bf67bff
2 files changed
+9 -3

No files matched your search

+7 -1
View File
@@ -447,6 +447,7 @@ flatpak_transaction_add_ref (FlatpakTransaction *self,
const char *pref;
g_autofree char *remote_metadata = NULL;
g_autoptr(GKeyFile) metakey = NULL;
g_autoptr(GError) local_error = NULL;
pref = strchr (ref, '/') + 1;
@@ -478,8 +479,13 @@ flatpak_transaction_add_ref (FlatpakTransaction *self,
}
if (metadata == NULL && remote != NULL &&
flatpak_dir_fetch_ref_cache (self->dir, remote, ref, NULL, NULL, &remote_metadata, NULL, NULL))
flatpak_dir_fetch_ref_cache (self->dir, remote, ref, NULL, NULL, &remote_metadata, NULL, &local_error))
metadata = remote_metadata;
else
{
g_print ("Warning: Can't find dependencies: %s\n", local_error->message);
g_clear_error (&local_error);
}
if (metadata)
{
+2 -2
View File
@@ -7282,7 +7282,7 @@ flatpak_dir_parse_summary_for_ref (FlatpakDir *self,
if (cache_v == NULL)
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
_("Data not found"));
_("No flatpak cache in remote summary"));
return FALSE;
}
@@ -7291,7 +7291,7 @@ flatpak_dir_parse_summary_for_ref (FlatpakDir *self,
if (res == NULL)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
_("Data not found for ref %s"), ref);
_("No entry for %s in remote summary flatpak cache "), ref);
return FALSE;
}