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
This commit is contained in:
1 parent
82024f161b
commit
620a90ebfa
7 files changed
+37
-40
No files matched your search
@@ -1128,7 +1128,9 @@ on_request_sent (GObject *object,
|
||||
g_prefix_error (&local_error,
|
||||
"All %u mirrors failed. Last error was: ",
|
||||
pending->mirrorlist->len);
|
||||
if (pending->thread_closure->remote_name)
|
||||
if (pending->thread_closure->remote_name &&
|
||||
!((pending->flags & OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT) > 0 &&
|
||||
code == G_IO_ERROR_NOT_FOUND))
|
||||
_ostree_fetcher_journal_failure (pending->thread_closure->remote_name,
|
||||
uristring, local_error->message);
|
||||
|
||||
@@ -1238,13 +1240,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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user