core: s/pack/archived/
This completes the rename from the previous commit.
This commit is contained in:
parent
d6ceb91c35
commit
f6117de8d3
|
|
@ -556,13 +556,13 @@ ostree_get_relative_object_path (const char *checksum,
|
|||
}
|
||||
|
||||
gboolean
|
||||
ostree_pack_file_for_input (GOutputStream *output,
|
||||
GFileInfo *finfo,
|
||||
GInputStream *instream,
|
||||
GVariant *xattrs,
|
||||
GChecksum **out_checksum,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
ostree_archive_file_for_input (GOutputStream *output,
|
||||
GFileInfo *finfo,
|
||||
GInputStream *instream,
|
||||
GVariant *xattrs,
|
||||
GChecksum **out_checksum,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
guint32 uid, gid, mode;
|
||||
|
|
@ -580,7 +580,7 @@ ostree_pack_file_for_input (GOutputStream *output,
|
|||
gid = g_file_info_get_attribute_uint32 (finfo, G_FILE_ATTRIBUTE_UNIX_GID);
|
||||
mode = g_file_info_get_attribute_uint32 (finfo, G_FILE_ATTRIBUTE_UNIX_MODE);
|
||||
|
||||
g_variant_builder_init (&pack_builder, G_VARIANT_TYPE (OSTREE_PACK_FILE_VARIANT_FORMAT));
|
||||
g_variant_builder_init (&pack_builder, G_VARIANT_TYPE (OSTREE_ARCHIVED_FILE_VARIANT_FORMAT));
|
||||
pack_builder_initialized = TRUE;
|
||||
g_variant_builder_add (&pack_builder, "u", GUINT32_TO_BE (0));
|
||||
g_variant_builder_add (&pack_builder, "u", GUINT32_TO_BE (uid));
|
||||
|
|
@ -687,12 +687,12 @@ ostree_pack_file_for_input (GOutputStream *output,
|
|||
}
|
||||
|
||||
gboolean
|
||||
ostree_parse_packed_file (GFile *file,
|
||||
GFileInfo **out_file_info,
|
||||
GVariant **out_xattrs,
|
||||
GInputStream **out_content,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
ostree_parse_archived_file (GFile *file,
|
||||
GFileInfo **out_file_info,
|
||||
GVariant **out_xattrs,
|
||||
GInputStream **out_content,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
char *metadata_buf = NULL;
|
||||
|
|
@ -737,7 +737,7 @@ ostree_parse_packed_file (GFile *file,
|
|||
goto out;
|
||||
}
|
||||
|
||||
metadata = g_variant_new_from_data (G_VARIANT_TYPE (OSTREE_PACK_FILE_VARIANT_FORMAT),
|
||||
metadata = g_variant_new_from_data (G_VARIANT_TYPE (OSTREE_ARCHIVED_FILE_VARIANT_FORMAT),
|
||||
metadata_buf, metadata_len, FALSE,
|
||||
(GDestroyNotify)g_free,
|
||||
metadata_buf);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ gboolean ostree_checksum_file_async_finish (GFile *f,
|
|||
GVariant *ostree_create_directory_metadata (GFileInfo *dir_info,
|
||||
GVariant *xattrs);
|
||||
|
||||
/* Packed files:
|
||||
/* Archived files:
|
||||
*
|
||||
* guint32 metadata_length [metadata gvariant] [content]
|
||||
*
|
||||
|
|
@ -155,20 +155,15 @@ GVariant *ostree_create_directory_metadata (GFileInfo *dir_info,
|
|||
* symlink, then this is the target; if device, then device ID as
|
||||
* network byte order uint32.
|
||||
*/
|
||||
#define OSTREE_PACK_FILE_VARIANT_FORMAT "(uuuua(ayay)t)"
|
||||
#define OSTREE_ARCHIVED_FILE_VARIANT_FORMAT "(uuuua(ayay)t)"
|
||||
|
||||
gboolean ostree_pack_file (GOutputStream *output,
|
||||
GFile *file,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
gboolean ostree_pack_file_for_input (GOutputStream *output,
|
||||
GFileInfo *finfo,
|
||||
GInputStream *input,
|
||||
GVariant *xattrs,
|
||||
GChecksum **out_checksum,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
gboolean ostree_archive_file_for_input (GOutputStream *output,
|
||||
GFileInfo *finfo,
|
||||
GInputStream *input,
|
||||
GVariant *xattrs,
|
||||
GChecksum **out_checksum,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
gboolean ostree_create_file_from_input (GFile *file,
|
||||
GFileInfo *finfo,
|
||||
|
|
@ -199,12 +194,12 @@ gboolean ostree_create_temp_regular_file (GFile *dir,
|
|||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
gboolean ostree_parse_packed_file (GFile *file,
|
||||
GFileInfo **out_file_info,
|
||||
GVariant **out_xattrs,
|
||||
GInputStream **out_content,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
gboolean ostree_parse_archived_file (GFile *file,
|
||||
GFileInfo **out_file_info,
|
||||
GVariant **out_xattrs,
|
||||
GInputStream **out_content,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
gboolean ostree_unpack_object (GFile *file,
|
||||
OstreeObjectType objtype,
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ _ostree_repo_file_get_xattrs (OstreeRepoFile *self,
|
|||
else if (ostree_repo_get_mode (self->repo) == OSTREE_REPO_MODE_ARCHIVE)
|
||||
{
|
||||
local_file = _ostree_repo_file_nontree_get_local (self);
|
||||
if (!ostree_parse_packed_file (local_file, NULL, &ret_xattrs, NULL, cancellable, error))
|
||||
if (!ostree_parse_archived_file (local_file, NULL, &ret_xattrs, NULL, cancellable, error))
|
||||
goto out;
|
||||
}
|
||||
else
|
||||
|
|
@ -1037,7 +1037,7 @@ _ostree_repo_file_tree_query_child (OstreeRepoFile *self,
|
|||
|
||||
if (ostree_repo_get_mode (self->repo) == OSTREE_REPO_MODE_ARCHIVE)
|
||||
{
|
||||
if (!ostree_parse_packed_file (local_child, &ret_info, NULL, NULL, cancellable, error))
|
||||
if (!ostree_parse_archived_file (local_child, &ret_info, NULL, NULL, cancellable, error))
|
||||
goto out;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -671,8 +671,8 @@ ostree_repo_stage_object (OstreeRepo *self,
|
|||
cancellable, error))
|
||||
goto out;
|
||||
|
||||
if (!ostree_pack_file_for_input (temp_out, file_info, input, xattrs,
|
||||
&ret_checksum, cancellable, error))
|
||||
if (!ostree_archive_file_for_input (temp_out, file_info, input, xattrs,
|
||||
&ret_checksum, cancellable, error))
|
||||
goto out;
|
||||
|
||||
if (!g_output_stream_close (temp_out, cancellable, error))
|
||||
|
|
@ -995,12 +995,12 @@ ostree_repo_store_object_trusted (OstreeRepo *self,
|
|||
}
|
||||
|
||||
gboolean
|
||||
ostree_repo_store_packfile (OstreeRepo *self,
|
||||
const char *expected_checksum,
|
||||
const char *path,
|
||||
OstreeObjectType objtype,
|
||||
gboolean *did_exist,
|
||||
GError **error)
|
||||
ostree_repo_store_archived_file (OstreeRepo *self,
|
||||
const char *expected_checksum,
|
||||
const char *path,
|
||||
OstreeObjectType objtype,
|
||||
gboolean *did_exist,
|
||||
GError **error)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GChecksum *checksum = NULL;
|
||||
|
|
@ -1020,7 +1020,7 @@ ostree_repo_store_packfile (OstreeRepo *self,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!ostree_parse_packed_file (src, &file_info, &xattrs, &input, NULL, error))
|
||||
if (!ostree_parse_archived_file (src, &file_info, &xattrs, &input, NULL, error))
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
@ -2141,8 +2141,8 @@ checkout_tree (OstreeRepo *self,
|
|||
|
||||
if (priv->mode == OSTREE_REPO_MODE_ARCHIVE)
|
||||
{
|
||||
if (!ostree_parse_packed_file (object_path, NULL, &xattrs, &packed_input,
|
||||
cancellable, error))
|
||||
if (!ostree_parse_archived_file (object_path, NULL, &xattrs, &packed_input,
|
||||
cancellable, error))
|
||||
goto out;
|
||||
|
||||
if (!checkout_file_from_input (dest_path, mode, file_info, xattrs,
|
||||
|
|
|
|||
|
|
@ -76,12 +76,12 @@ GFile * ostree_repo_get_object_path (OstreeRepo *self,
|
|||
const char *object,
|
||||
OstreeObjectType type);
|
||||
|
||||
gboolean ostree_repo_store_packfile (OstreeRepo *self,
|
||||
const char *expected_checksum,
|
||||
const char *path,
|
||||
OstreeObjectType objtype,
|
||||
gboolean *did_exist,
|
||||
GError **error);
|
||||
gboolean ostree_repo_store_archived_file (OstreeRepo *self,
|
||||
const char *expected_checksum,
|
||||
const char *path,
|
||||
OstreeObjectType objtype,
|
||||
gboolean *did_exist,
|
||||
GError **error);
|
||||
|
||||
gboolean ostree_repo_store_object_trusted (OstreeRepo *self,
|
||||
GFile *file,
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ store_object (OstreeRepo *repo,
|
|||
if (!fetch_uri (repo, soup, obj_uri, &filename, error))
|
||||
goto out;
|
||||
|
||||
if (!ostree_repo_store_packfile (repo, object, filename, objtype, did_exist, error))
|
||||
if (!ostree_repo_store_archived_file (repo, object, filename, objtype, did_exist, error))
|
||||
goto out;
|
||||
|
||||
ret = TRUE;
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ typedef struct {
|
|||
} OtFsckData;
|
||||
|
||||
static gboolean
|
||||
checksum_packed_file (OtFsckData *data,
|
||||
GFile *file,
|
||||
GChecksum **out_checksum,
|
||||
GError **error)
|
||||
checksum_archived_file (OtFsckData *data,
|
||||
GFile *file,
|
||||
GChecksum **out_checksum,
|
||||
GError **error)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GChecksum *ret_checksum = NULL;
|
||||
|
|
@ -71,7 +71,7 @@ checksum_packed_file (OtFsckData *data,
|
|||
if (!g_input_stream_read_all ((GInputStream*)in, metadata_buf, metadata_len, &bytes_read, NULL, error))
|
||||
goto out;
|
||||
|
||||
metadata = g_variant_new_from_data (G_VARIANT_TYPE (OSTREE_PACK_FILE_VARIANT_FORMAT),
|
||||
metadata = g_variant_new_from_data (G_VARIANT_TYPE (OSTREE_ARCHIVED_FILE_VARIANT_FORMAT),
|
||||
metadata_buf, metadata_len, FALSE, NULL, NULL);
|
||||
|
||||
g_variant_get (metadata, "(uuuu@a(ayay)t)",
|
||||
|
|
@ -136,7 +136,7 @@ object_iter_callback (OstreeRepo *repo,
|
|||
path);
|
||||
goto out;
|
||||
}
|
||||
if (!checksum_packed_file (data, objf, &real_checksum, &error))
|
||||
if (!checksum_archived_file (data, objf, &real_checksum, &error))
|
||||
goto out;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -99,11 +99,11 @@ object_iter_callback (OstreeRepo *repo,
|
|||
|
||||
if (ostree_repo_get_mode (data->src_repo) == OSTREE_REPO_MODE_ARCHIVE)
|
||||
{
|
||||
if (!ostree_repo_store_packfile (data->dest_repo, checksum,
|
||||
ot_gfile_get_path_cached (objfile),
|
||||
objtype,
|
||||
&did_exist,
|
||||
&error))
|
||||
if (!ostree_repo_store_archived_file (data->dest_repo, checksum,
|
||||
ot_gfile_get_path_cached (objfile),
|
||||
objtype,
|
||||
&did_exist,
|
||||
&error))
|
||||
goto out;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue