repo: Change the pairs of checksums to instead be based on OstreeRepoFiles
We want an OstreeRepoFile to be the way to reference a "filesystem tree" that's stored in the repo, which is a combination of a DIR_TREE and a DIR_META. The idea is that once you write an mtree to the repo using ostree_repo_write_mtree, it becomes serialized and you get an OstreeRepoFile in return. Change any APIs that care about DIR_TREE / DIR_META checksums to care about OstreeRepoFiles instead, which right now is mostly is ostree_repo_write_commit. https://bugzilla.gnome.org/show_bug.cgi?id=707727
This commit is contained in:
1 parent
33db74d0ce
commit
c7f9fc9c63
5 files changed
+75
-77
No files matched your search
@@ -104,10 +104,10 @@ set_error_noent (GFile *self, GError **error)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static OstreeRepoFile *
|
||||
ostree_repo_file_new_root (OstreeRepo *repo,
|
||||
const char *contents_checksum,
|
||||
const char *metadata_checksum)
|
||||
OstreeRepoFile *
|
||||
_ostree_repo_file_new_root (OstreeRepo *repo,
|
||||
const char *contents_checksum,
|
||||
const char *metadata_checksum)
|
||||
{
|
||||
OstreeRepoFile *self;
|
||||
|
||||
@@ -172,7 +172,7 @@ _ostree_repo_file_new_for_commit (OstreeRepo *repo,
|
||||
ostree_checksum_inplace_from_bytes (g_variant_get_data (tree_metadata_csum_v),
|
||||
tree_metadata_csum);
|
||||
|
||||
ret = ostree_repo_file_new_root (repo, tree_contents_csum, tree_metadata_csum);
|
||||
ret = _ostree_repo_file_new_root (repo, tree_contents_csum, tree_metadata_csum);
|
||||
|
||||
out:
|
||||
return ret;
|
||||
@@ -530,7 +530,7 @@ ostree_repo_file_dup (GFile *file)
|
||||
if (self->parent)
|
||||
return G_FILE (ostree_repo_file_new_child (self->parent, self->name));
|
||||
else
|
||||
return G_FILE (ostree_repo_file_new_root (self->repo, self->tree_contents_checksum, self->tree_metadata_checksum));
|
||||
return G_FILE (_ostree_repo_file_new_root (self->repo, self->tree_contents_checksum, self->tree_metadata_checksum));
|
||||
}
|
||||
|
||||
static guint
|
||||
|
||||
Reference in new issue
Block a user