![]() |
![]() |
![]() |
OSTree Manual | |
---|---|---|---|---|
Top | Description |
Content-addressed object storeContent-addressed object store — A git-like storage system for operating system binaries |
enum OstreeRepoMode; OstreeRepo * ostree_repo_new (GFile *path
); gboolean ostree_repo_check (OstreeRepo *self
,GError **error
); GFile * ostree_repo_get_path (OstreeRepo *self
); OstreeRepoMode ostree_repo_get_mode (OstreeRepo *self
); gboolean ostree_repo_mode_from_string (const char *mode
,OstreeRepoMode *out_mode
,GError **error
); GKeyFile * ostree_repo_get_config (OstreeRepo *self
); GKeyFile * ostree_repo_copy_config (OstreeRepo *self
); OstreeRepo * ostree_repo_get_parent (OstreeRepo *self
); gboolean ostree_repo_write_config (OstreeRepo *self
,GKeyFile *new_config
,GError **error
); gboolean ostree_repo_prepare_transaction (OstreeRepo *self
,gboolean enable_commit_hardlink_scan
,gboolean *out_transaction_resume
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_commit_transaction (OstreeRepo *self
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_commit_transaction_with_stats (OstreeRepo *self
,guint *out_metadata_objects_total
,guint *out_metadata_objects_written
,guint *out_content_objects_total
,guint *out_content_objects_written
,guint64 *out_content_bytes_written
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_abort_transaction (OstreeRepo *self
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_has_object (OstreeRepo *self
,OstreeObjectType objtype
,const char *checksum
,gboolean *out_have_object
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_stage_metadata (OstreeRepo *self
,OstreeObjectType objtype
,const char *expected_checksum
,GVariant *object
,guchar **out_csum
,GCancellable *cancellable
,GError **error
); void ostree_repo_stage_metadata_async (OstreeRepo *self
,OstreeObjectType objtype
,const char *expected_checksum
,GVariant *object
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean ostree_repo_stage_metadata_finish (OstreeRepo *self
,GAsyncResult *result
,guchar **out_csum
,GError **error
); gboolean ostree_repo_stage_metadata_trusted (OstreeRepo *self
,OstreeObjectType objtype
,const char *checksum
,GVariant *variant
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_stage_content (OstreeRepo *self
,const char *expected_checksum
,GInputStream *object_input
,guint64 length
,guchar **out_csum
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_stage_content_trusted (OstreeRepo *self
,const char *checksum
,GInputStream *object_input
,guint64 length
,GCancellable *cancellable
,GError **error
); void ostree_repo_stage_content_async (OstreeRepo *self
,const char *expected_checksum
,GInputStream *object
,guint64 length
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean ostree_repo_stage_content_finish (OstreeRepo *self
,GAsyncResult *result
,guchar **out_csum
,GError **error
); gboolean ostree_repo_resolve_rev (OstreeRepo *self
,const char *refspec
,gboolean allow_noent
,char **out_rev
,GError **error
); gboolean ostree_repo_write_ref (OstreeRepo *self
,const char *remote
,const char *name
,const char *rev
,GError **error
); gboolean ostree_repo_write_refspec (OstreeRepo *self
,const char *refspec
,const char *rev
,GError **error
); gboolean ostree_repo_list_refs (OstreeRepo *repo
,const char *refspec_prefix
,GHashTable **out_all_refs
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_load_variant_c (OstreeRepo *self
,OstreeObjectType objtype
,const guchar *csum
,GVariant **out_variant
,GError **error
); gboolean ostree_repo_load_variant (OstreeRepo *self
,OstreeObjectType objtype
,const char *sha256
,GVariant **out_variant
,GError **error
); gboolean ostree_repo_load_variant_if_exists (OstreeRepo *self
,OstreeObjectType objtype
,const char *sha256
,GVariant **out_variant
,GError **error
); gboolean ostree_repo_load_file (OstreeRepo *self
,const char *checksum
,GInputStream **out_input
,GFileInfo **out_file_info
,GVariant **out_xattrs
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_load_object_stream (OstreeRepo *self
,OstreeObjectType objtype
,const char *checksum
,GInputStream **out_input
,guint64 *out_size
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_query_object_storage_size (OstreeRepo *self
,OstreeObjectType objtype
,const char *sha256
,gsize *out_size
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_delete_object (OstreeRepo *self
,OstreeObjectType objtype
,const char *sha256
,GCancellable *cancellable
,GError **error
); enum OstreeRepoCommitFilterResult; OstreeRepoCommitFilterResult (*OstreeRepoCommitFilter) (OstreeRepo *repo
,const char *path
,GFileInfo *file_info
,gpointer user_data
); OstreeRepoCommitModifier; OstreeRepoCommitModifier * ostree_repo_commit_modifier_new (void
); OstreeRepoCommitModifier * ostree_repo_commit_modifier_ref (OstreeRepoCommitModifier *modifier
); void ostree_repo_commit_modifier_unref (OstreeRepoCommitModifier *modifier
); gboolean ostree_repo_stage_directory_to_mtree (OstreeRepo *self
,GFile *dir
,OstreeMutableTree *mtree
,OstreeRepoCommitModifier *modifier
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_stage_archive_to_mtree (OstreeRepo *self
,GFile *archive
,OstreeMutableTree *tree
,OstreeRepoCommitModifier *modifier
,gboolean autocreate_parents
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_stage_mtree (OstreeRepo *self
,OstreeMutableTree *mtree
,char **out_contents_checksum
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_stage_commit (OstreeRepo *self
,const char *branch
,const char *parent
,const char *subject
,const char *body
,const char *root_contents_checksum
,const char *root_metadata_checksum
,char **out_commit
,GCancellable *cancellable
,GError **error
); enum OstreeRepoCheckoutMode; enum OstreeRepoCheckoutOverwriteMode; void ostree_repo_checkout_tree_async (OstreeRepo *self
,OstreeRepoCheckoutMode mode
,OstreeRepoCheckoutOverwriteMode overwrite_mode
,GFile *destination
,OstreeRepoFile *source
,GFileInfo *source_info
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean ostree_repo_checkout_tree_finish (OstreeRepo *self
,GAsyncResult *result
,GError **error
); gboolean ostree_repo_checkout_gc (OstreeRepo *self
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_read_commit (OstreeRepo *self
,const char *rev
,GFile **out_root
,GCancellable *cancellable
,GError **error
); enum OstreeRepoListObjectsFlags; #define OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE gboolean ostree_repo_list_objects (OstreeRepo *self
,OstreeRepoListObjectsFlags flags
,GHashTable **out_objects
,GCancellable *cancellable
,GError **error
); GHashTable * ostree_repo_traverse_new_reachable (void
); gboolean ostree_repo_traverse_dirtree (OstreeRepo *repo
,const char *commit_checksum
,GHashTable *inout_reachable
,GCancellable *cancellable
,GError **error
); gboolean ostree_repo_traverse_commit (OstreeRepo *repo
,const char *commit_checksum
,int maxdepth
,GHashTable *inout_reachable
,GCancellable *cancellable
,GError **error
); enum OstreeRepoPruneFlags; gboolean ostree_repo_prune (OstreeRepo *repo
,OstreeRepoPruneFlags flags
,gint depth
,gint *out_objects_total
,gint *out_objects_pruned
,guint64 *out_pruned_object_size_total
,GCancellable *cancellable
,GError **error
); enum OstreeRepoPullFlags; gboolean ostree_repo_pull (OstreeRepo *self
,const char *remote_name
,char **refs_to_fetch
,OstreeRepoPullFlags flags
,GCancellable *cancellable
,GError **error
);
The OstreeRepo is like git, a content-addressed object store. Unlike git, it records uid, gid, and extended attributes.
There are two possible "modes" for an OstreeRepo;
OSTREE_REPO_MODE_BARE
is very simple - content files are
represented exactly as they are, and checkouts are just hardlinks.
A OSTREE_REPO_MODE_ARCHIVE_Z2
repository in contrast stores
content files zlib-compressed. It is suitable for non-root-owned
repositories that can be served via a static HTTP server.
To store content in the repo, first start a transaction with
ostree_repo_prepare_transaction()
. Then create a
OstreeMutableTree, and apply functions such as
ostree_repo_stage_directory_to_mtree()
to traverse a physical
filesystem and stage content, possibly multiple times.
Once the OstreeMutableTree is complete, stage all of its metadata
with ostree_repo_stage_mtree()
, and finally create a commit with
ostree_repo_stage_commit()
.
typedef enum { OSTREE_REPO_MODE_BARE, OSTREE_REPO_MODE_ARCHIVE_Z2 } OstreeRepoMode;
See the documentation of OstreeRepo for more information about the possible modes.
GFile * ostree_repo_get_path (OstreeRepo *self
);
Returns : |
Path to repo. [transfer none] |
gboolean ostree_repo_mode_from_string (const char *mode
,OstreeRepoMode *out_mode
,GError **error
);
GKeyFile * ostree_repo_get_config (OstreeRepo *self
);
Returns : |
The repository configuration; do not modify. [transfer none] |
GKeyFile * ostree_repo_copy_config (OstreeRepo *self
);
Returns : |
A newly-allocated copy of the repository config. [transfer full] |
OstreeRepo * ostree_repo_get_parent (OstreeRepo *self
);
Before this function can be used, ostree_repo_init()
must have been
called.
|
Repo |
Returns : |
Parent repository, or NULL if none. [transfer none]
|
gboolean ostree_repo_write_config (OstreeRepo *self
,GKeyFile *new_config
,GError **error
);
Save new_config
in place of this repository's config file. Note
that new_config
should not be modified after - this function
simply adds a reference.
|
Repo |
|
Overwrite the config file with this data. Do not change later! |
|
a GError |
gboolean ostree_repo_prepare_transaction (OstreeRepo *self
,gboolean enable_commit_hardlink_scan
,gboolean *out_transaction_resume
,GCancellable *cancellable
,GError **error
);
gboolean ostree_repo_commit_transaction (OstreeRepo *self
,GCancellable *cancellable
,GError **error
);
gboolean ostree_repo_commit_transaction_with_stats (OstreeRepo *self
,guint *out_metadata_objects_total
,guint *out_metadata_objects_written
,guint *out_content_objects_total
,guint *out_content_objects_written
,guint64 *out_content_bytes_written
,GCancellable *cancellable
,GError **error
);
gboolean ostree_repo_abort_transaction (OstreeRepo *self
,GCancellable *cancellable
,GError **error
);
gboolean ostree_repo_has_object (OstreeRepo *self
,OstreeObjectType objtype
,const char *checksum
,gboolean *out_have_object
,GCancellable *cancellable
,GError **error
);
Set out_have_object
to TRUE
if self
contains the given object;
FALSE
otherwise.
|
Repo |
|
Object type |
|
ASCII SHA256 checksum |
|
TRUE if repository contains object. [out]
|
|
Cancellable |
|
Error |
Returns : |
FALSE if an unexpected error occurred, TRUE otherwise |
gboolean ostree_repo_stage_metadata (OstreeRepo *self
,OstreeObjectType objtype
,const char *expected_checksum
,GVariant *object
,guchar **out_csum
,GCancellable *cancellable
,GError **error
);
Store the metadata object variant
. Return the checksum
as out_csum
.
If expected_checksum
is not NULL
, verify it against the
computed checksum.
|
Repo |
|
Object type |
|
If provided, validate content against this checksum. [allow-none] |
|
Metadata |
|
Binary checksum. [out][array fixed-size=32][allow-none] |
|
Cancellable |
|
Error |
void ostree_repo_stage_metadata_async (OstreeRepo *self
,OstreeObjectType objtype
,const char *expected_checksum
,GVariant *object
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously store the metadata object variant
. If provided,
the checksum expected_checksum
will be verified.
|
Repo |
|
Object type |
|
If provided, validate content against this checksum. [allow-none] |
|
Metadata |
|
Cancellable |
|
Invoked when metadata is staged |
|
Data for callback
|
gboolean ostree_repo_stage_metadata_finish (OstreeRepo *self
,GAsyncResult *result
,guchar **out_csum
,GError **error
);
gboolean ostree_repo_stage_metadata_trusted (OstreeRepo *self
,OstreeObjectType objtype
,const char *checksum
,GVariant *variant
,GCancellable *cancellable
,GError **error
);
Store the metadata object variant
; the provided checksum
is
trusted.
|
Repo |
|
Object type |
|
Store object with this ASCII SHA256 checksum |
|
Metadata object |
|
Cancellable |
|
Error |
gboolean ostree_repo_stage_content (OstreeRepo *self
,const char *expected_checksum
,GInputStream *object_input
,guint64 length
,guchar **out_csum
,GCancellable *cancellable
,GError **error
);
Store the content object streamed as object_input
,
with total length length
. The actual checksum will
be returned as out_csum
.
|
Repo |
|
If provided, validate content against this checksum. [allow-none] |
|
Content object stream |
|
Length of object_input
|
|
Binary checksum. [out][array fixed-size=32][allow-none] |
|
Cancellable |
|
Error |
gboolean ostree_repo_stage_content_trusted (OstreeRepo *self
,const char *checksum
,GInputStream *object_input
,guint64 length
,GCancellable *cancellable
,GError **error
);
Store the content object streamed as object_input
, with total
length length
. The given checksum
will be treated as trusted.
This function should be used when importing file objects from local disk, for example.
|
Repo |
|
Store content using this ASCII SHA256 checksum |
|
Content stream |
|
Length of object_input
|
|
Cancellable |
|
Data for callback
|
void ostree_repo_stage_content_async (OstreeRepo *self
,const char *expected_checksum
,GInputStream *object
,guint64 length
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously store the content object object
. If provided, the
checksum expected_checksum
will be verified.
|
Repo |
|
If provided, validate content against this checksum. [allow-none] |
|
Input |
|
Length of object
|
|
Cancellable |
|
Invoked when content is staged |
|
User data for callback
|
gboolean ostree_repo_stage_content_finish (OstreeRepo *self
,GAsyncResult *result
,guchar **out_csum
,GError **error
);
Completes an invocation of ostree_repo_stage_content_async()
.
|
a OstreeRepo |
|
a GAsyncResult |
|
A binary SHA256 checksum of the content object. [out][transfer full] |
|
a GError |
gboolean ostree_repo_resolve_rev (OstreeRepo *self
,const char *refspec
,gboolean allow_noent
,char **out_rev
,GError **error
);
Look up the given refspec, returning the checksum it references in
the parameter out_rev
.
|
Repo |
|
A refspec |
|
Do not throw an error if refspec does not exist |
|
A checksum,or NULL if allow_noent is true and it does not exist. [out][transfer full]
|
|
Error |
gboolean ostree_repo_write_ref (OstreeRepo *self
,const char *remote
,const char *name
,const char *rev
,GError **error
);
gboolean ostree_repo_write_refspec (OstreeRepo *self
,const char *refspec
,const char *rev
,GError **error
);
gboolean ostree_repo_list_refs (OstreeRepo *repo
,const char *refspec_prefix
,GHashTable **out_all_refs
,GCancellable *cancellable
,GError **error
);
gboolean ostree_repo_load_variant_c (OstreeRepo *self
,OstreeObjectType objtype
,const guchar *csum
,GVariant **out_variant
,GError **error
);
Load the metadata object csum
of type objtype
, storing the
result in out_variant
.
|
Repo |
|
Expected object type |
|
Binary checksum |
|
(transfer full): Metadata object. [out] |
|
Error |
gboolean ostree_repo_load_variant (OstreeRepo *self
,OstreeObjectType objtype
,const char *sha256
,GVariant **out_variant
,GError **error
);
Load the metadata object sha256
of type objtype
, storing the
result in out_variant
.
|
Repo |
|
Expected object type |
|
Checksum string |
|
(transfer full): Metadata object. [out] |
|
Error |
gboolean ostree_repo_load_variant_if_exists (OstreeRepo *self
,OstreeObjectType objtype
,const char *sha256
,GVariant **out_variant
,GError **error
);
Attempt to load the metadata object sha256
of type objtype
if it
exists, storing the result in out_variant
. If it doesn't exist,
NULL
is returned.
|
Repo |
|
Object type |
|
ASCII checksum |
|
Metadata. [out][transfer full] |
|
Error |
gboolean ostree_repo_load_file (OstreeRepo *self
,const char *checksum
,GInputStream **out_input
,GFileInfo **out_file_info
,GVariant **out_xattrs
,GCancellable *cancellable
,GError **error
);
Load content object, decomposing it into three parts: the actual content (for regular files), the metadata, and extended attributes.
|
Repo |
|
ASCII SHA256 checksum |
|
File content. [out][allow-none] |
|
File information. [out][allow-none] |
|
Extended attributes. [out][allow-none] |
|
Cancellable |
|
Error |
gboolean ostree_repo_load_object_stream (OstreeRepo *self
,OstreeObjectType objtype
,const char *checksum
,GInputStream **out_input
,guint64 *out_size
,GCancellable *cancellable
,GError **error
);
Load object as a stream; useful when copying objects between repositories.
gboolean ostree_repo_query_object_storage_size (OstreeRepo *self
,OstreeObjectType objtype
,const char *sha256
,gsize *out_size
,GCancellable *cancellable
,GError **error
);
Return the size in bytes of object with checksum sha256
, after any
compression has been applied.
|
Repo |
|
Object type |
|
Checksum |
|
Size in bytes object occupies physically. [out] |
|
Cancellable |
|
Error |
gboolean ostree_repo_delete_object (OstreeRepo *self
,OstreeObjectType objtype
,const char *sha256
,GCancellable *cancellable
,GError **error
);
Remove the object of type objtype
with checksum sha256
from the repository. An error of type G_IO_ERROR_NOT_FOUND
is thrown if the object does not exist.
|
Repo |
|
Object type |
|
Checksum |
|
Cancellable |
|
Error |
typedef enum { OSTREE_REPO_COMMIT_FILTER_ALLOW, OSTREE_REPO_COMMIT_FILTER_SKIP } OstreeRepoCommitFilterResult;
OstreeRepoCommitFilterResult (*OstreeRepoCommitFilter) (OstreeRepo *repo
,const char *path
,GFileInfo *file_info
,gpointer user_data
);
|
Repo |
|
Path to file |
|
File information |
|
User data |
Returns : |
OstreeRepoCommitFilterResult saying whether or not to commit this file |
typedef struct { volatile gint refcount; guint reserved_flags : 31; guint skip_xattrs : 1; OstreeRepoCommitFilter filter; gpointer user_data; gpointer reserved[3]; } OstreeRepoCommitModifier;
A structure allowing control over commits.
OstreeRepoCommitModifier * ostree_repo_commit_modifier_new
(void
);
Returns : |
A new commit modifier. [transfer full] |
OstreeRepoCommitModifier * ostree_repo_commit_modifier_ref
(OstreeRepoCommitModifier *modifier
);
void ostree_repo_commit_modifier_unref (OstreeRepoCommitModifier *modifier
);
gboolean ostree_repo_stage_directory_to_mtree (OstreeRepo *self
,GFile *dir
,OstreeMutableTree *mtree
,OstreeRepoCommitModifier *modifier
,GCancellable *cancellable
,GError **error
);
Store objects for dir
and all children into the repository self
,
overlaying the resulting filesystem hierarchy into mtree
.
|
Repo |
|
Path to a directory |
|
Overlay directory contents into this tree |
|
Optional modifier. [allow-none] |
|
Cancellable |
|
Error |
gboolean ostree_repo_stage_archive_to_mtree (OstreeRepo *self
,GFile *archive
,OstreeMutableTree *tree
,OstreeRepoCommitModifier *modifier
,gboolean autocreate_parents
,GCancellable *cancellable
,GError **error
);
gboolean ostree_repo_stage_mtree (OstreeRepo *self
,OstreeMutableTree *mtree
,char **out_contents_checksum
,GCancellable *cancellable
,GError **error
);
Write all metadata objects for mtree
to repo; the resulting
out_contents_checksum
contains the checksum for the
OSTREE_OBJECT_TYPE_DIR_TREE
object.
|
Repo |
|
Mutable tree |
|
Return location for ASCII checksum. [out] |
|
Cancellable |
|
Error |
gboolean ostree_repo_stage_commit (OstreeRepo *self
,const char *branch
,const char *parent
,const char *subject
,const char *body
,const char *root_contents_checksum
,const char *root_metadata_checksum
,char **out_commit
,GCancellable *cancellable
,GError **error
);
Write a commit metadata object, referencing root_contents_checksum
and root_metadata_checksum
.
|
Repo |
|
Name of ref |
|
ASCII SHA256 checksum for parent, or NULL for none. [allow-none]
|
|
Subject |
|
Body |
|
ASCII SHA256 checksum for OSTREE_OBJECT_TYPE_DIR_TREE
|
|
ASCII SHA256 checksum for OSTREE_OBJECT_TYPE_DIR_META
|
|
Resulting ASCII SHA256 checksum for commit. [out] |
|
Cancellable |
|
Error |
typedef enum { OSTREE_REPO_CHECKOUT_MODE_NONE = 0, OSTREE_REPO_CHECKOUT_MODE_USER = 1 } OstreeRepoCheckoutMode;
typedef enum { OSTREE_REPO_CHECKOUT_OVERWRITE_NONE = 0, OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES = 1 } OstreeRepoCheckoutOverwriteMode;
void ostree_repo_checkout_tree_async (OstreeRepo *self
,OstreeRepoCheckoutMode mode
,OstreeRepoCheckoutOverwriteMode overwrite_mode
,GFile *destination
,OstreeRepoFile *source
,GFileInfo *source_info
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
gboolean ostree_repo_checkout_tree_finish (OstreeRepo *self
,GAsyncResult *result
,GError **error
);
gboolean ostree_repo_checkout_gc (OstreeRepo *self
,GCancellable *cancellable
,GError **error
);
Call this after finishing a succession of checkout operations; it will delete any currently-unused uncompressed objects from the cache.
|
Repo |
|
Cancellable |
|
Error |
gboolean ostree_repo_read_commit (OstreeRepo *self
,const char *rev
,GFile **out_root
,GCancellable *cancellable
,GError **error
);
Load the content for rev
into out_root
.
|
Repo |
|
Revision (ref or ASCII checksum) |
|
An OstreeRepoFile corresponding to the root. [out] |
|
Cancellable |
|
Error |
typedef enum { OSTREE_REPO_LIST_OBJECTS_LOOSE = (1 << 0), OSTREE_REPO_LIST_OBJECTS_PACKED = (1 << 1), OSTREE_REPO_LIST_OBJECTS_ALL = (1 << 2) } OstreeRepoListObjectsFlags;
#define OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE (G_VARIANT_TYPE ("(bas)")
b - TRUE
if object is available "loose"
as - List of pack file checksums in which this object appears
gboolean ostree_repo_list_objects (OstreeRepo *self
,OstreeRepoListObjectsFlags flags
,GHashTable **out_objects
,GCancellable *cancellable
,GError **error
);
This function synchronously enumerates all objects in the
repository, returning data in out_objects
. out_objects
maps from keys returned by ostree_object_name_serialize()
to GVariant values of type OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE
.
|
Repo |
|
Flags controlling enumeration |
|
Map of serialized object name to variant data. [out] |
|
Cancellable |
|
Error |
Returns : |
TRUE on success, FALSE on error, and error will be set |
GHashTable * ostree_repo_traverse_new_reachable (void
);
This hash table is a set of GVariant which can be accessed via
ostree_object_name_deserialize()
.
Returns : |
A new hash table. [transfer full][element-type GVariant GVariant] |
gboolean ostree_repo_traverse_dirtree (OstreeRepo *repo
,const char *commit_checksum
,GHashTable *inout_reachable
,GCancellable *cancellable
,GError **error
);
gboolean ostree_repo_traverse_commit (OstreeRepo *repo
,const char *commit_checksum
,int maxdepth
,GHashTable *inout_reachable
,GCancellable *cancellable
,GError **error
);
typedef enum { OSTREE_REPO_PRUNE_FLAGS_NONE, OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE, OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY } OstreeRepoPruneFlags;
gboolean ostree_repo_prune (OstreeRepo *repo
,OstreeRepoPruneFlags flags
,gint depth
,gint *out_objects_total
,gint *out_objects_pruned
,guint64 *out_pruned_object_size_total
,GCancellable *cancellable
,GError **error
);
typedef enum { OSTREE_REPO_PULL_FLAGS_NONE, OSTREE_REPO_PULL_FLAGS_RELATED } OstreeRepoPullFlags;
gboolean ostree_repo_pull (OstreeRepo *self
,const char *remote_name
,char **refs_to_fetch
,OstreeRepoPullFlags flags
,GCancellable *cancellable
,GError **error
);
Connect to the remote repository, fetching the specified set of
refs refs_to_fetch
. For each ref that is changed, download the
commit, all metadata, and all content objects, storing them safely
on disk in self
.
|
Repo |
|
Name of remote |
|
Optional list of refs; if NULL , fetch all configured refs. [array zero-terminated=1][element-type utf8][allow-none]
|
|
Options controlling fetch behavior |
|
Cancellable |
|
Error |