From 4e1bf67bff138293d906072dabce5c50a4ec8c84 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 12 Jan 2017 10:45:44 +0100 Subject: [PATCH] Print a warning if the remote metadata cache is not found --- app/flatpak-transaction.c | 8 +++++++- common/flatpak-dir.c | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/flatpak-transaction.c b/app/flatpak-transaction.c index 4b294938e..f05b31a18 100644 --- a/app/flatpak-transaction.c +++ b/app/flatpak-transaction.c @@ -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) { diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 4dd263cc1..b6c981acb 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -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; }