summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-fetcher-curl.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2017-07-05 16:41:38 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2017-07-13 21:41:00 +0000
commit620a90ebfaf98f779b77cd8f97da1d06e146b832 (patch)
tree79fedc7f52da2f0505016f8031bb995951a79d2f /src/libostree/ostree-fetcher-curl.c
parent82024f161b280b4ef70880ddd5bc83ad812e6f0a (diff)
downloadostree-620a90ebfaf98f779b77cd8f97da1d06e146b832.tar.gz
lib/pull: Avoid journaling 404s for optional content
Currently in Fedora we don't sign summaries, and every use of `rpm-ostree` would emit to the journal an error when we failed to fetch it. Fix this by having `OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT` tell the fetcher not to journal 404 errors. While fixing this, we had a mix of two booleans vs the flags; fix things so we consistently use the flags in the fetcher and pull code. Closes: #1004 Approved by: mbarnes
Diffstat (limited to 'src/libostree/ostree-fetcher-curl.c')
-rw-r--r--src/libostree/ostree-fetcher-curl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c
index 77844ec7..ae8bea73 100644
--- a/src/libostree/ostree-fetcher-curl.c
+++ b/src/libostree/ostree-fetcher-curl.c
@@ -353,7 +353,9 @@ check_multi_info (OstreeFetcher *fetcher)
g_autofree char *msg = g_strdup_printf ("Server returned HTTP %lu", response);
g_task_return_new_error (task, G_IO_ERROR, giocode,
"%s", msg);
- if (req->fetcher->remote_name)
+ if (req->fetcher->remote_name &&
+ !((req->flags & OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT) > 0 &&
+ giocode == G_IO_ERROR_NOT_FOUND))
_ostree_fetcher_journal_failure (req->fetcher->remote_name,
eff_url, msg);
@@ -859,13 +861,14 @@ void
_ostree_fetcher_request_to_tmpfile (OstreeFetcher *self,
GPtrArray *mirrorlist,
const char *filename,
+ OstreeFetcherRequestFlags flags,
guint64 max_size,
int priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
- _ostree_fetcher_request_async (self, mirrorlist, filename, 0, FALSE,
+ _ostree_fetcher_request_async (self, mirrorlist, filename, flags, FALSE,
max_size, priority, cancellable,
callback, user_data);
}