summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2018-01-30 11:44:47 +0100
committerAlexander Larsson <alexl@redhat.com>2018-01-30 11:55:48 +0100
commit306f36ce46cd7af0180b325d67a1e9fdcc37cf5a (patch)
treea74208558d7e0440effd8f5a33f1c43713f97403
parentc8c0df3fba458844d99ddd773244467fa4a35408 (diff)
downloadflatpak-306f36ce46cd7af0180b325d67a1e9fdcc37cf5a.tar.gz
Fix incorrect error message in update --appstream
When the specified remote existed, but had no updates we printed a message like: error: Remote "flathub" not found Closes: #1363 Approved by: alexlarsson (cherry picked from commit 3c9d3a316ea298c25e8756ab4f256b08879aff36)
-rw-r--r--app/flatpak-builtins-update.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/flatpak-builtins-update.c b/app/flatpak-builtins-update.c
index 68f0e7f7..ca192e65 100644
--- a/app/flatpak-builtins-update.c
+++ b/app/flatpak-builtins-update.c
@@ -123,13 +123,16 @@ update_appstream (GPtrArray *dirs, const char *remote, GCancellable *cancellable
{
FlatpakDir *dir = g_ptr_array_index (dirs, j);
- if (flatpak_dir_has_remote (dir, remote) &&
- flatpak_dir_check_for_appstream_update (dir, remote, opt_arch))
+ if (flatpak_dir_has_remote (dir, remote))
{
g_autoptr(OstreeAsyncProgress) progress = NULL;
found = TRUE;
+ /* Early bail out check */
+ if (!flatpak_dir_check_for_appstream_update (dir, remote, opt_arch))
+ continue;
+
progress = ostree_async_progress_new_and_connect (no_progress_cb, NULL);
res = flatpak_dir_update_appstream (dir, remote, opt_arch, &changed,
progress, cancellable, error);