pull: Don't execute static deltas when mirroring

We don't presently support this, since the static delta code assumes
it can just `mmap()` file objects.  We could at some point implement
this, but for now just skip executing deltas when doing
`archive -> archive` mirroring.

I noticed this when trying to mirror a repo in Jenkins in
[CAHC](https://wiki.centos.org/SpecialInterestGroup/Atomic/Devel).

Closes: #408
Approved by: giuseppe
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2016-07-25 06:50:51 +00:00
1 parent a6aeacede6
commit bac1fa1839
2 files changed
+14 -2

No files matched your search

+2 -1
View File
@@ -2705,7 +2705,8 @@ ostree_repo_pull_with_options (OstreeRepo *self,
&from_revision, error))
goto out;
if (!disable_static_deltas && (from_revision == NULL || g_strcmp0 (from_revision, to_revision) != 0))
if (!disable_static_deltas && !pull_data->is_mirror &&
(from_revision == NULL || g_strcmp0 (from_revision, to_revision) != 0))
{
if (!request_static_delta_superblock_sync (pull_data, from_revision, to_revision,
&delta_superblock, cancellable, error))