From 98a45475107d507d85d946e934be9064fe2efcf7 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 10 Feb 2017 16:05:17 -0500 Subject: [PATCH] deltas: Don't put unreadable *from* objects in fallback In https://github.com/ostreedev/ostree/pull/634 we introduced a subtle regression - the unreadable object was added to the *new* reachable objects, when it shouldn't have been. Because it was a *from* object, clients already had it. This became more obvious now that I'm working on fixing delta progress - I noticed my deltas were always starting out with 40MB fetched, which turned out to be a non-world-readable initramfs object. This code should simply *skip* the unreadable object, and the delta processing below properly iterates over "new objects", so we'll pick it up from there. Closes: #678 Approved by: giuseppe --- src/libostree/ostree-repo-static-delta-compilation.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libostree/ostree-repo-static-delta-compilation.c b/src/libostree/ostree-repo-static-delta-compilation.c index 657e8676..47fae9f5 100644 --- a/src/libostree/ostree-repo-static-delta-compilation.c +++ b/src/libostree/ostree-repo-static-delta-compilation.c @@ -1003,11 +1003,7 @@ generate_delta_lowlatency (OstreeRepo *repo, if (!check_object_world_readable (repo, from_checksum, &from_world_readable, cancellable, error)) goto out; if (!from_world_readable) - { - g_hash_table_iter_steal (&hashiter); - g_hash_table_add (new_reachable_regfile_content, (char*)from_checksum); - continue; - } + continue; if (!try_content_rollsum (repo, opts, from_checksum, to_checksum, &rollsum, cancellable, error))