ostree_repo_list_commit_objects_starting_with
ostree_repo_list_static_delta_names
ostree_repo_list_static_delta_indexes
+ostree_repo_static_delta_reindex
OstreeStaticDeltaGenerateOpt
ostree_repo_static_delta_generate
ostree_repo_static_delta_execute_offline_with_signature
LIBOSTREE_2020.8 {
global:
ostree_repo_list_static_delta_indexes;
+ ostree_repo_static_delta_reindex;
} LIBOSTREE_2020.7;
/* Stub section for the stable release *after* this development one; don't
return g_bytes_equal (existing_data, data);
}
+/**
+ * ostree_repo_static_delta_reindex:
+ * @repo: Repo
+ * @flags: Flags affecting the indexing operation
+ * @opt_to_commit: ASCII SHA256 checksum of target commit, or %NULL to index all targets
+ * @cancellable: Cancellable
+ * @error: Error
+ *
+ * The delta index for a particular commit lists all the existing deltas that can be used
+ * when downloading that commit. This operation regenerates these indexes, either for
+ * a particular commit (if @opt_to_commit is non-%NULL), or for all commits that
+ * are reachable by an existing delta (if @opt_to_commit is %NULL).
+ *
+ * This is normally called automatically when the summary is updated in ostree_repo_regenerate_summary().
+ *
+ * Locking: shared
+ */
gboolean
-_ostree_repo_static_delta_reindex (OstreeRepo *repo,
- const char *opt_to_commit,
- GCancellable *cancellable,
- GError **error)
+ostree_repo_static_delta_reindex (OstreeRepo *repo,
+ OstreeStaticDeltaIndexFlags flags,
+ const char *opt_to_commit,
+ GCancellable *cancellable,
+ GError **error)
{
g_autoptr(GPtrArray) all_deltas = NULL;
g_autoptr(GHashTable) deltas_to_commit_ht = NULL; /* map: to checksum -> ptrarray of from checksums (or NULL) */
g_variant_ref_sink (summary);
}
- if (!_ostree_repo_static_delta_reindex (self, NULL, cancellable, error))
+ if (!ostree_repo_static_delta_reindex (self, 0, NULL, cancellable, error))
return FALSE;
if (!_ostree_repo_file_replace_contents (self,
GCancellable *cancellable,
GError **error);
+/**
+ * OstreeStaticDeltaIndexFlags:
+ * @OSTREE_STATIC_DELTA_INDEX_FLAGS_NONE: No special flags
+ *
+ * Flags controlling static delta index generation.
+ */
+typedef enum {
+ OSTREE_STATIC_DELTA_INDEX_FLAGS_NONE = 0,
+} OstreeStaticDeltaIndexFlags;
+
+_OSTREE_PUBLIC
+gboolean ostree_repo_static_delta_reindex (OstreeRepo *repo,
+ OstreeStaticDeltaIndexFlags flags,
+ const char *opt_to_commit,
+ GCancellable *cancellable,
+ GError **error);
+
_OSTREE_PUBLIC
gboolean ostree_repo_static_delta_execute_offline_with_signature (OstreeRepo *self,
GFile *dir_or_file,