mirror of
https://github.com/ostreedev/ostree.git
synced 2025-02-20 01:59:07 +03:00
core: Rename "store" public APIs to "stage" since that's what they do
This commit is contained in:
parent
06548f137e
commit
72257bab2b
@ -720,15 +720,15 @@ dup_file_info_owned_by_me (GFileInfo *file_info)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
stage_object (OstreeRepo *self,
|
||||
OstreeObjectType objtype,
|
||||
GFileInfo *file_info,
|
||||
GVariant *xattrs,
|
||||
GInputStream *input,
|
||||
const char *expected_checksum,
|
||||
GChecksum **out_checksum,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
stage_object_impl (OstreeRepo *self,
|
||||
OstreeObjectType objtype,
|
||||
GFileInfo *file_info,
|
||||
GVariant *xattrs,
|
||||
GInputStream *input,
|
||||
const char *expected_checksum,
|
||||
GChecksum **out_checksum,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
static gboolean
|
||||
impl_stage_archive_file_object_from_raw (OstreeRepo *self,
|
||||
@ -824,15 +824,15 @@ impl_stage_archive_file_object_from_raw (OstreeRepo *self,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
stage_object (OstreeRepo *self,
|
||||
OstreeObjectType objtype,
|
||||
GFileInfo *file_info,
|
||||
GVariant *xattrs,
|
||||
GInputStream *input,
|
||||
const char *expected_checksum,
|
||||
GChecksum **out_checksum,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
stage_object_impl (OstreeRepo *self,
|
||||
OstreeObjectType objtype,
|
||||
GFileInfo *file_info,
|
||||
GVariant *xattrs,
|
||||
GInputStream *input,
|
||||
const char *expected_checksum,
|
||||
GChecksum **out_checksum,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
OstreeRepoPrivate *priv = GET_PRIVATE (self);
|
||||
@ -1042,9 +1042,9 @@ stage_gvariant_object (OstreeRepo *self,
|
||||
g_variant_get_size (serialized),
|
||||
NULL);
|
||||
|
||||
if (!stage_object (self, type,
|
||||
NULL, NULL, mem,
|
||||
NULL, &ret_checksum, cancellable, error))
|
||||
if (!stage_object_impl (self, type,
|
||||
NULL, NULL, mem,
|
||||
NULL, &ret_checksum, cancellable, error))
|
||||
goto out;
|
||||
|
||||
ret = TRUE;
|
||||
@ -1146,7 +1146,7 @@ ostree_repo_get_object_path (OstreeRepo *self,
|
||||
}
|
||||
|
||||
gboolean
|
||||
ostree_repo_store_object_trusted (OstreeRepo *self,
|
||||
ostree_repo_stage_object_trusted (OstreeRepo *self,
|
||||
OstreeObjectType objtype,
|
||||
const char *checksum,
|
||||
GFileInfo *file_info,
|
||||
@ -1155,13 +1155,13 @@ ostree_repo_store_object_trusted (OstreeRepo *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
return stage_object (self, objtype,
|
||||
file_info, xattrs, input,
|
||||
checksum, NULL, cancellable, error);
|
||||
return stage_object_impl (self, objtype,
|
||||
file_info, xattrs, input,
|
||||
checksum, NULL, cancellable, error);
|
||||
}
|
||||
|
||||
gboolean
|
||||
ostree_repo_store_object (OstreeRepo *self,
|
||||
ostree_repo_stage_object (OstreeRepo *self,
|
||||
OstreeObjectType objtype,
|
||||
const char *expected_checksum,
|
||||
GFileInfo *file_info,
|
||||
@ -1173,9 +1173,9 @@ ostree_repo_store_object (OstreeRepo *self,
|
||||
gboolean ret = FALSE;
|
||||
GChecksum *actual_checksum = NULL;
|
||||
|
||||
if (!stage_object (self, objtype,
|
||||
file_info, xattrs, input,
|
||||
expected_checksum, &actual_checksum, cancellable, error))
|
||||
if (!stage_object_impl (self, objtype,
|
||||
file_info, xattrs, input,
|
||||
expected_checksum, &actual_checksum, cancellable, error))
|
||||
goto out;
|
||||
|
||||
ret = TRUE;
|
||||
@ -1463,9 +1463,9 @@ stage_directory_recurse (OstreeRepo *self,
|
||||
if (!xattrs)
|
||||
goto out;
|
||||
|
||||
if (!stage_object (self, OSTREE_OBJECT_TYPE_RAW_FILE,
|
||||
modified_info, xattrs, file_input, NULL,
|
||||
&child_file_checksum, cancellable, error))
|
||||
if (!stage_object_impl (self, OSTREE_OBJECT_TYPE_RAW_FILE,
|
||||
modified_info, xattrs, file_input, NULL,
|
||||
&child_file_checksum, cancellable, error))
|
||||
goto out;
|
||||
|
||||
g_hash_table_replace (file_checksums, g_strdup (name),
|
||||
@ -1633,10 +1633,10 @@ import_libarchive_entry_file (OstreeRepo *self,
|
||||
if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_REGULAR)
|
||||
archive_stream = ostree_libarchive_input_stream_new (a);
|
||||
|
||||
if (!stage_object (self, OSTREE_OBJECT_TYPE_RAW_FILE,
|
||||
file_info, NULL, archive_stream,
|
||||
NULL, &ret_checksum,
|
||||
cancellable, error))
|
||||
if (!stage_object_impl (self, OSTREE_OBJECT_TYPE_RAW_FILE,
|
||||
file_info, NULL, archive_stream,
|
||||
NULL, &ret_checksum,
|
||||
cancellable, error))
|
||||
goto out;
|
||||
|
||||
ret = TRUE;
|
||||
|
@ -94,7 +94,7 @@ gboolean ostree_repo_has_object (OstreeRepo *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
gboolean ostree_repo_store_object (OstreeRepo *self,
|
||||
gboolean ostree_repo_stage_object (OstreeRepo *self,
|
||||
OstreeObjectType objtype,
|
||||
const char *expected_checksum,
|
||||
GFileInfo *file_info,
|
||||
@ -103,7 +103,7 @@ gboolean ostree_repo_store_object (OstreeRepo *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
gboolean ostree_repo_store_object_trusted (OstreeRepo *self,
|
||||
gboolean ostree_repo_stage_object_trusted (OstreeRepo *self,
|
||||
OstreeObjectType objtype,
|
||||
const char *checksum,
|
||||
GFileInfo *file_info,
|
||||
|
@ -187,7 +187,7 @@ store_object (OstreeRepo *repo,
|
||||
if (!input)
|
||||
goto out;
|
||||
|
||||
if (!ostree_repo_store_object (repo, objtype, checksum, file_info, NULL, input, NULL, error))
|
||||
if (!ostree_repo_stage_object (repo, objtype, checksum, file_info, NULL, input, NULL, error))
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -273,7 +273,7 @@ store_tree_recurse (OstreeRepo *repo,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!ostree_repo_store_object (repo, OSTREE_OBJECT_TYPE_RAW_FILE,
|
||||
if (!ostree_repo_stage_object (repo, OSTREE_OBJECT_TYPE_RAW_FILE,
|
||||
checksum,
|
||||
archive_file_info, archive_xattrs, input,
|
||||
NULL, error))
|
||||
|
@ -125,7 +125,7 @@ object_iter_callback (OstreeRepo *repo,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!ostree_repo_store_object_trusted (data->dest_repo, OSTREE_OBJECT_TYPE_RAW_FILE, checksum,
|
||||
if (!ostree_repo_stage_object_trusted (data->dest_repo, OSTREE_OBJECT_TYPE_RAW_FILE, checksum,
|
||||
archive_info, xattrs, input,
|
||||
NULL, error))
|
||||
goto out;
|
||||
@ -139,7 +139,7 @@ object_iter_callback (OstreeRepo *repo,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!ostree_repo_store_object_trusted (data->dest_repo, objtype, checksum,
|
||||
if (!ostree_repo_stage_object_trusted (data->dest_repo, objtype, checksum,
|
||||
file_info, xattrs, input,
|
||||
NULL, error))
|
||||
goto out;
|
||||
|
Loading…
x
Reference in New Issue
Block a user