ostree/fsck: Verify commit bindings for each ref

Since an OSTree client will refuse to pull from a remote which it has
locally configured with a collection ID, if the commit on that remote
has incorrect or missing bindings, we’d better verify them as part of
fsck.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #1347
Approved by: cgwalters
This commit is contained in:
Philip Withnall 2017-11-20 12:51:28 +00:00 committed by Atomic Bot
parent 931cbe6fc9
commit 97bdb3b271
1 changed files with 4 additions and 0 deletions

View File

@ -159,6 +159,10 @@ fsck_commit_for_ref (OstreeRepo *repo,
return glnx_prefix_error (error, "Loading commit for ref %s", ref_name);
}
/* Check its bindings. */
if (!ostree_cmd__private__ ()->ostree_repo_verify_bindings (collection_id, ref_name, commit, error))
return glnx_prefix_error (error, "Commit %s", checksum);
return TRUE;
}