[ostree] core: s/pack/archived/



commit f6117de8d3dcef809fade2c85bfea0604a095079
Author: Colin Walters <walters verbum org>
Date:   Thu Dec 8 17:45:37 2011 -0500

    core: s/pack/archived/
    
    This completes the rename from the previous commit.

 src/libostree/ostree-core.c         |   30 +++++++++++++++---------------
 src/libostree/ostree-core.h         |   35 +++++++++++++++--------------------
 src/libostree/ostree-repo-file.c    |    4 ++--
 src/libostree/ostree-repo.c         |   22 +++++++++++-----------
 src/libostree/ostree-repo.h         |   12 ++++++------
 src/ostree/ostree-pull.c            |    2 +-
 src/ostree/ot-builtin-fsck.c        |   12 ++++++------
 src/ostree/ot-builtin-local-clone.c |   10 +++++-----
 8 files changed, 61 insertions(+), 66 deletions(-)
---
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index 78150b4..a1c98fd 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -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);
diff --git a/src/libostree/ostree-core.h b/src/libostree/ostree-core.h
index d87a004..1f926c4 100644
--- a/src/libostree/ostree-core.h
+++ b/src/libostree/ostree-core.h
@@ -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,
diff --git a/src/libostree/ostree-repo-file.c b/src/libostree/ostree-repo-file.c
index 120c7dc..ef0446e 100644
--- a/src/libostree/ostree-repo-file.c
+++ b/src/libostree/ostree-repo-file.c
@@ -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
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index b998e5c..af198c8 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -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, 
diff --git a/src/libostree/ostree-repo.h b/src/libostree/ostree-repo.h
index 4a2d140..dc2f224 100644
--- a/src/libostree/ostree-repo.h
+++ b/src/libostree/ostree-repo.h
@@ -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,
diff --git a/src/ostree/ostree-pull.c b/src/ostree/ostree-pull.c
index 3c9cecf..d75991b 100644
--- a/src/ostree/ostree-pull.c
+++ b/src/ostree/ostree-pull.c
@@ -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;
diff --git a/src/ostree/ot-builtin-fsck.c b/src/ostree/ot-builtin-fsck.c
index f73f5e9..15f72a9 100644
--- a/src/ostree/ot-builtin-fsck.c
+++ b/src/ostree/ot-builtin-fsck.c
@@ -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
diff --git a/src/ostree/ot-builtin-local-clone.c b/src/ostree/ot-builtin-local-clone.c
index 5df7b21..132821d 100644
--- a/src/ostree/ot-builtin-local-clone.c
+++ b/src/ostree/ot-builtin-local-clone.c
@@ -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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]