libostree: Add API to write metadata as stream
And use it in pull-local. The goal here is to kill users of ostree_repo_load_variant(), and move a bit more towards hiding the variants.
This commit is contained in:
1 parent
b4082d5642
commit
9b31b526cc
4 files changed
+47
-17
No files matched your search
@@ -823,6 +823,33 @@ ostree_repo_write_metadata (OstreeRepo *self,
|
||||
cancellable, error);
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_repo_write_metadata_stream_trusted:
|
||||
* @self: Repo
|
||||
* @objtype: Object type
|
||||
* @checksum: Store object with this ASCII SHA256 checksum
|
||||
* @object_input: Metadata object stream
|
||||
* @length: Length, may be 0 for unknown
|
||||
* @cancellable: Cancellable
|
||||
* @error: Error
|
||||
*
|
||||
* Store the metadata object @variant; the provided @checksum is
|
||||
* trusted.
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_write_metadata_stream_trusted (OstreeRepo *self,
|
||||
OstreeObjectType objtype,
|
||||
const char *checksum,
|
||||
GInputStream *object_input,
|
||||
guint64 length,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
/* Ignore provided length for now */
|
||||
return write_object (self, objtype, checksum, object_input, 0, NULL,
|
||||
cancellable, error);
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_repo_write_metadata_trusted:
|
||||
* @self: Repo
|
||||
|
||||
Reference in new issue
Block a user