core: Rename "store" public APIs to "stage" since that's what they do

This commit is contained in:
Colin Walters 2011-12-21 17:13:04 -05:00
parent 06548f137e
commit 72257bab2b
4 changed files with 42 additions and 42 deletions

View File

@ -720,15 +720,15 @@ dup_file_info_owned_by_me (GFileInfo *file_info)
} }
static gboolean static gboolean
stage_object (OstreeRepo *self, stage_object_impl (OstreeRepo *self,
OstreeObjectType objtype, OstreeObjectType objtype,
GFileInfo *file_info, GFileInfo *file_info,
GVariant *xattrs, GVariant *xattrs,
GInputStream *input, GInputStream *input,
const char *expected_checksum, const char *expected_checksum,
GChecksum **out_checksum, GChecksum **out_checksum,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
static gboolean static gboolean
impl_stage_archive_file_object_from_raw (OstreeRepo *self, impl_stage_archive_file_object_from_raw (OstreeRepo *self,
@ -824,15 +824,15 @@ impl_stage_archive_file_object_from_raw (OstreeRepo *self,
} }
static gboolean static gboolean
stage_object (OstreeRepo *self, stage_object_impl (OstreeRepo *self,
OstreeObjectType objtype, OstreeObjectType objtype,
GFileInfo *file_info, GFileInfo *file_info,
GVariant *xattrs, GVariant *xattrs,
GInputStream *input, GInputStream *input,
const char *expected_checksum, const char *expected_checksum,
GChecksum **out_checksum, GChecksum **out_checksum,
GCancellable *cancellable, GCancellable *cancellable,
GError **error) GError **error)
{ {
gboolean ret = FALSE; gboolean ret = FALSE;
OstreeRepoPrivate *priv = GET_PRIVATE (self); OstreeRepoPrivate *priv = GET_PRIVATE (self);
@ -1042,9 +1042,9 @@ stage_gvariant_object (OstreeRepo *self,
g_variant_get_size (serialized), g_variant_get_size (serialized),
NULL); NULL);
if (!stage_object (self, type, if (!stage_object_impl (self, type,
NULL, NULL, mem, NULL, NULL, mem,
NULL, &ret_checksum, cancellable, error)) NULL, &ret_checksum, cancellable, error))
goto out; goto out;
ret = TRUE; ret = TRUE;
@ -1146,7 +1146,7 @@ ostree_repo_get_object_path (OstreeRepo *self,
} }
gboolean gboolean
ostree_repo_store_object_trusted (OstreeRepo *self, ostree_repo_stage_object_trusted (OstreeRepo *self,
OstreeObjectType objtype, OstreeObjectType objtype,
const char *checksum, const char *checksum,
GFileInfo *file_info, GFileInfo *file_info,
@ -1155,13 +1155,13 @@ ostree_repo_store_object_trusted (OstreeRepo *self,
GCancellable *cancellable, GCancellable *cancellable,
GError **error) GError **error)
{ {
return stage_object (self, objtype, return stage_object_impl (self, objtype,
file_info, xattrs, input, file_info, xattrs, input,
checksum, NULL, cancellable, error); checksum, NULL, cancellable, error);
} }
gboolean gboolean
ostree_repo_store_object (OstreeRepo *self, ostree_repo_stage_object (OstreeRepo *self,
OstreeObjectType objtype, OstreeObjectType objtype,
const char *expected_checksum, const char *expected_checksum,
GFileInfo *file_info, GFileInfo *file_info,
@ -1173,9 +1173,9 @@ ostree_repo_store_object (OstreeRepo *self,
gboolean ret = FALSE; gboolean ret = FALSE;
GChecksum *actual_checksum = NULL; GChecksum *actual_checksum = NULL;
if (!stage_object (self, objtype, if (!stage_object_impl (self, objtype,
file_info, xattrs, input, file_info, xattrs, input,
expected_checksum, &actual_checksum, cancellable, error)) expected_checksum, &actual_checksum, cancellable, error))
goto out; goto out;
ret = TRUE; ret = TRUE;
@ -1463,9 +1463,9 @@ stage_directory_recurse (OstreeRepo *self,
if (!xattrs) if (!xattrs)
goto out; goto out;
if (!stage_object (self, OSTREE_OBJECT_TYPE_RAW_FILE, if (!stage_object_impl (self, OSTREE_OBJECT_TYPE_RAW_FILE,
modified_info, xattrs, file_input, NULL, modified_info, xattrs, file_input, NULL,
&child_file_checksum, cancellable, error)) &child_file_checksum, cancellable, error))
goto out; goto out;
g_hash_table_replace (file_checksums, g_strdup (name), 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) if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_REGULAR)
archive_stream = ostree_libarchive_input_stream_new (a); archive_stream = ostree_libarchive_input_stream_new (a);
if (!stage_object (self, OSTREE_OBJECT_TYPE_RAW_FILE, if (!stage_object_impl (self, OSTREE_OBJECT_TYPE_RAW_FILE,
file_info, NULL, archive_stream, file_info, NULL, archive_stream,
NULL, &ret_checksum, NULL, &ret_checksum,
cancellable, error)) cancellable, error))
goto out; goto out;
ret = TRUE; ret = TRUE;

View File

@ -94,7 +94,7 @@ gboolean ostree_repo_has_object (OstreeRepo *self,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
gboolean ostree_repo_store_object (OstreeRepo *self, gboolean ostree_repo_stage_object (OstreeRepo *self,
OstreeObjectType objtype, OstreeObjectType objtype,
const char *expected_checksum, const char *expected_checksum,
GFileInfo *file_info, GFileInfo *file_info,
@ -103,7 +103,7 @@ gboolean ostree_repo_store_object (OstreeRepo *self,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
gboolean ostree_repo_store_object_trusted (OstreeRepo *self, gboolean ostree_repo_stage_object_trusted (OstreeRepo *self,
OstreeObjectType objtype, OstreeObjectType objtype,
const char *checksum, const char *checksum,
GFileInfo *file_info, GFileInfo *file_info,

View File

@ -187,7 +187,7 @@ store_object (OstreeRepo *repo,
if (!input) if (!input)
goto out; 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; goto out;
} }
@ -273,7 +273,7 @@ store_tree_recurse (OstreeRepo *repo,
goto out; 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, checksum,
archive_file_info, archive_xattrs, input, archive_file_info, archive_xattrs, input,
NULL, error)) NULL, error))

View File

@ -125,7 +125,7 @@ object_iter_callback (OstreeRepo *repo,
goto out; 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, archive_info, xattrs, input,
NULL, error)) NULL, error))
goto out; goto out;
@ -139,7 +139,7 @@ object_iter_callback (OstreeRepo *repo,
goto out; 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, file_info, xattrs, input,
NULL, error)) NULL, error))
goto out; goto out;