core: Clean up object storage API
Rather than passing xattr/file_info for all objects, change the API to assume we're passing the defined object stream for each type. Namely, for OSTREE_OBJECT_TYPE_FILE, we're now giving the "archive file" data. This significantly cleans up the code for committing to archive mode repositories, at the cost of having to (at present) create an intermediate temporary file when committing to raw repositories.
This commit is contained in:
1 parent
99cb8a80fa
commit
67f61976f4
7 files changed
+142
-222
No files matched your search
@@ -175,15 +175,18 @@ ostree_chain_input_stream_read (GInputStream *stream,
|
||||
if (self->priv->index >= self->priv->streams->len)
|
||||
return 0;
|
||||
|
||||
child = self->priv->streams->pdata[self->priv->index];
|
||||
|
||||
res = g_input_stream_read (child,
|
||||
buffer,
|
||||
count,
|
||||
cancellable,
|
||||
error);
|
||||
if (res == 0)
|
||||
self->priv->index++;
|
||||
res = 0;
|
||||
while (res == 0 && self->priv->index < self->priv->streams->len)
|
||||
{
|
||||
child = self->priv->streams->pdata[self->priv->index];
|
||||
res = g_input_stream_read (child,
|
||||
buffer,
|
||||
count,
|
||||
cancellable,
|
||||
error);
|
||||
if (res == 0)
|
||||
self->priv->index++;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user