Fix error handling while deploying AppStream
authorSimon McVittie <smcv@collabora.com>
Sat, 7 Jul 2018 11:35:10 +0000 (12:35 +0100)
committerSimon McVittie <smcv@debian.org>
Sat, 7 Jul 2018 11:54:42 +0000 (12:54 +0100)
Setting an error with second_error->message is going to work poorly
when second_error has never been set non-NULL.

Related to #1845, although not necessarily the full solution.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Forwarded: https://github.com/flatpak/flatpak/pull/1867

Gbp-Pq: Name Fix-error-handling-while-deploying-AppStream.patch

system-helper/flatpak-system-helper.c

index 55d8fdcfafdbd0c7b92afbfe73ab7a79721c3229..c8dbdc6d19020ce9da2504b5029d2e3b31355236 100644 (file)
@@ -589,7 +589,7 @@ handle_deploy_appstream (FlatpakSystemHelper   *object,
         {
           if (!flatpak_dir_pull (system, state, old_branch, NULL, NULL, NULL, NULL,
                                  FLATPAK_PULL_FLAGS_NONE, OSTREE_REPO_PULL_FLAGS_UNTRUSTED, ostree_progress,
-                                 NULL, NULL))
+                                 NULL, &second_error))
             {
               g_prefix_error (&first_error, "Error updating appstream2: ");
               g_prefix_error (&second_error, "%s; Error updating appstream: ", first_error->message);