pull: Write .commitpartial for local pulls first too

This is what we do for non-local (i.e. HTTP) pulls; we wnat to
correctly handle being interrupted during partial pulls.

Closes: https://github.com/ostreedev/ostree/issues/579

Closes: #613
Approved by: jlebon
This commit is contained in:
Colin Walters 2016-12-05 20:56:55 -05:00 committed by Atomic Bot
parent 4c8fc92aa0
commit 0fb3645fed
1 changed files with 4 additions and 4 deletions

View File

@ -1273,15 +1273,15 @@ scan_one_metadata_object_c (OtPullData *pull_data,
{ {
if (!is_stored) if (!is_stored)
{ {
if (!ostree_repo_import_object_from_with_trust (pull_data->repo, pull_data->remote_repo_local,
objtype, tmp_checksum, !pull_data->is_untrusted,
cancellable, error))
goto out;
if (objtype == OSTREE_OBJECT_TYPE_COMMIT) if (objtype == OSTREE_OBJECT_TYPE_COMMIT)
{ {
if (!write_commitpartial_for (pull_data, tmp_checksum, error)) if (!write_commitpartial_for (pull_data, tmp_checksum, error))
goto out; goto out;
} }
if (!ostree_repo_import_object_from_with_trust (pull_data->repo, pull_data->remote_repo_local,
objtype, tmp_checksum, !pull_data->is_untrusted,
cancellable, error))
goto out;
} }
is_stored = TRUE; is_stored = TRUE;
is_requested = TRUE; is_requested = TRUE;