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
@@ -431,10 +431,7 @@ try_one_url (OstreeMetalinkRequest *self,
|
||||
gssize n_bytes;
|
||||
|
||||
if (!_ostree_fetcher_request_uri_to_membuf (self->metalink->fetcher,
|
||||
uri,
|
||||
FALSE,
|
||||
FALSE,
|
||||
&bytes,
|
||||
uri, 0, &bytes,
|
||||
self->metalink->max_size,
|
||||
self->cancellable,
|
||||
error))
|
||||
@@ -614,14 +611,9 @@ _ostree_metalink_request_sync (OstreeMetalink *self,
|
||||
request.urls = g_ptr_array_new_with_free_func ((GDestroyNotify) _ostree_fetcher_uri_free);
|
||||
request.parser = g_markup_parse_context_new (&metalink_parser, G_MARKUP_PREFIX_ERROR_POSITION, &request, NULL);
|
||||
|
||||
if (!_ostree_fetcher_request_uri_to_membuf (self->fetcher,
|
||||
self->uri,
|
||||
FALSE,
|
||||
FALSE,
|
||||
&contents,
|
||||
self->max_size,
|
||||
cancellable,
|
||||
error))
|
||||
if (!_ostree_fetcher_request_uri_to_membuf (self->fetcher, self->uri, 0,
|
||||
&contents, self->max_size,
|
||||
cancellable, error))
|
||||
goto out;
|
||||
|
||||
data = g_bytes_get_data (contents, &len);
|
||||
|
||||
Reference in new issue
Block a user