From: Simon McVittie Date: Sat, 7 Jul 2018 11:35:10 +0000 (+0100) Subject: Fix error handling while deploying AppStream X-Git-Tag: archive/raspbian/1.0.2-1+rpi1~1^2^2^2^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7b2e6558b913825a5b61b51a95157cd51057d22c;p=flatpak.git Fix error handling while deploying AppStream 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 Forwarded: https://github.com/flatpak/flatpak/pull/1867 Gbp-Pq: Name Fix-error-handling-while-deploying-AppStream.patch --- diff --git a/system-helper/flatpak-system-helper.c b/system-helper/flatpak-system-helper.c index 55d8fdc..c8dbdc6 100644 --- a/system-helper/flatpak-system-helper.c +++ b/system-helper/flatpak-system-helper.c @@ -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);