pull: Add support for resuming downloads via range requests

Use a consistent temporary filename to download uri's.
Check for downloaded files before fetching from uri.
Download to hash.part file, then copy/move to hash.done when complete.
Add argument support to setup_fake_remote_repo1 function.
Add test for pull resume.
To implement this, pass --force-range-requests into the trivial-httpd,
which will only serve half of the objects to clients at a time.

https://bugzilla.gnome.org/show_bug.cgi?id=706344
This commit is contained in:
Jeremy Whiting authored and Colin Walters committed 2013-08-28 14:35:54 -04:00
1 parent 902848cd71
commit 499df2a90b
6 files changed
+303 -35

No files matched your search

+10
View File
@@ -60,6 +60,16 @@ guint64 ostree_fetcher_bytes_transferred (OstreeFetcher *self);
guint ostree_fetcher_get_n_requests (OstreeFetcher *self);
void ostree_fetcher_request_uri_with_partial_async (OstreeFetcher *self,
SoupURI *uri,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFile *ostree_fetcher_request_uri_with_partial_finish (OstreeFetcher *self,
GAsyncResult *result,
GError **error);
void ostree_fetcher_request_uri_async (OstreeFetcher *self,
SoupURI *uri,
GCancellable *cancellable,