ostree_fetcher: new function _ostree_fetcher_contents_membuf_sync

Move code from ostree-repo-pull.c

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
metalink: have a single entry to the metalink module

Replace _ostree_metalink_request_async with a synchronous version.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ostree-fetcher: remove two unused functions

_ostree_fetcher_query_state_text() and_ostree_fetcher_get_n_requests()
have no callers, so remove them.

If they will be needed, they can be easily copied back from the git
history.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ostree-fetcher: add max_size argument to change _ostree_metalink_request_sync

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ostree-metalink: use _ostree_fetcher_contents_membuf_sync

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ostree-fetcher: Remove _ostree_fetcher_request_uri_to_stream function

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ostree-fetcher: make _ostree_fetcher_stream_uri_sync private

Rename _ostree_fetcher_contents_membuf_sync to
ostree_fetcher_request_uri_to_membuf and drop unused argument
user_data.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ostree-fetcher: move more logic into ostree_fetcher_request_uri_internal

Make _ostree_fetcher_request_uri_with_partial_async and
ostree_fetcher_stream_uri_async simple wrapper around the same
function, all the requests are created in the same place now.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Revert "ostree-repo-pull: Remove currently #if 0 static delta code"

This reverts commit 1c2e20af25b21abc0dee1547a0d5bad1a21c0b58.
Static deltas support

https://bugzilla.gnome.org/show_bug.cgi?id=721799
test-rollsum: Process all input, print more statistics

Copying the bup code, we need to loop over all chunks even after
hitting the rollsum returning 0.

Also print more statistics.
fix --help for static-delta

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
test: Fix invocation of static-delta

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>