pull: mark commits from local cache as partial
If one of the localcache repos has the exact same commit we resolved from the remote, then we need to make sure to mark it as partial so that we download the full tree. Closes: #1074 Closes: #1076 Approved by: cgwalters
This commit is contained in:
1 parent
2522db0164
commit
64b7c42025
3 files changed
+36
-9
No files matched your search
@@ -1790,6 +1790,7 @@ scan_one_metadata_object_c (OtPullData *pull_data,
|
||||
{
|
||||
if (objtype == OSTREE_OBJECT_TYPE_COMMIT)
|
||||
{
|
||||
/* mark as partial to ensure we scan the commit below */
|
||||
if (!write_commitpartial_for (pull_data, tmp_checksum, error))
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1819,6 +1820,12 @@ scan_one_metadata_object_c (OtPullData *pull_data,
|
||||
return FALSE;
|
||||
if (!localcache_repo_has_obj)
|
||||
continue;
|
||||
if (objtype == OSTREE_OBJECT_TYPE_COMMIT)
|
||||
{
|
||||
/* mark as partial to ensure we scan the commit below */
|
||||
if (!write_commitpartial_for (pull_data, tmp_checksum, error))
|
||||
return FALSE;
|
||||
}
|
||||
if (!ostree_repo_import_object_from_with_trust (pull_data->repo, refd_repo,
|
||||
objtype, tmp_checksum,
|
||||
!pull_data->is_untrusted,
|
||||
|
||||
Reference in new issue
Block a user