lib/static-delta: throw a proper error on bspatch failure
authorLuca BRUNO <luca.bruno@coreos.com>
Mon, 3 Jan 2022 17:38:51 +0000 (17:38 +0000)
committerLuca BRUNO <luca.bruno@coreos.com>
Mon, 3 Jan 2022 17:38:51 +0000 (17:38 +0000)
This makes sure that a populated GError is returned when bsdiff
patching fails. The human-friendly label also helps in debugging.

src/libostree/ostree-repo-static-delta-processing.c

index 020b0028717b6556b185772ac38067f891e6bdf1..6e093121eae5f57e7dd1c3b17a1b0aa2a8a020f1 100644 (file)
@@ -456,7 +456,7 @@ dispatch_bspatch (OstreeRepo                 *repo,
                    buf,
                    state->content_size,
                    &stream) < 0)
-        return FALSE;
+        return glnx_throw (error, "bsdiff patch failed");
 
       if (!_ostree_repo_bare_content_write (repo, &state->content_out,
                                             buf, state->content_size,