From: Colin Walters Date: Thu, 12 Oct 2017 14:46:25 +0000 (-0400) Subject: lib/deltas: Check cancellable during processing X-Git-Tag: archive/raspbian/2017.14-1+rpi1^2^2^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6d6081a6e5d7c64c2188411bbc9b119d1b0e355a;p=ostree.git lib/deltas: Check cancellable during processing Let's react to `Ctrl-C` faster here. Noticed while I was doing an update on my desktop and playing with cancellation. Closes: #1266 Approved by: jlebon Origin: upstream, 2017.13, commit:a1986b1a8083ef4f840973f1c73d932a52e43644 Gbp-Pq: Topic 2017.13 Gbp-Pq: Name lib-deltas-Check-cancellable-during-processing.patch --- diff --git a/src/libostree/ostree-repo-static-delta-processing.c b/src/libostree/ostree-repo-static-delta-processing.c index 844de2c6..78bf7e16 100644 --- a/src/libostree/ostree-repo-static-delta-processing.c +++ b/src/libostree/ostree-repo-static-delta-processing.c @@ -229,6 +229,9 @@ _ostree_static_delta_part_execute (OstreeRepo *repo, state->oplen--; state->opdata++; + if (g_cancellable_set_error_if_cancelled (cancellable, error)) + goto out; + switch (opcode) { case OSTREE_STATIC_DELTA_OP_OPEN_SPLICE_AND_CLOSE: