summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-sysroot.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2018-04-30 11:19:17 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-24 12:56:11 +0000
commit9131d8a4cc28ea498c2ebc058aac73f70d41841c (patch)
treeb1732a91526f3e39b72d36eb34d26601679d84f6 /src/libostree/ostree-sysroot.h
parent371081d123a9263d8dbdd4dad69c0468e2db427d (diff)
downloadostree-9131d8a4cc28ea498c2ebc058aac73f70d41841c.tar.gz
lib/sysroot: Add wrapper API to prune system repository
The initial motivation for this is that the "staging" code currently didn't rewrite the deployment refs, meaning that the staged commit could be pruned. Hence first, this new API ensures that deployments also hold a strong ref to their commit, without relying on the magical "deployment refs" that we inject. That has always been a weird artifact of the strict layering separation between OstreeSysroot and OstreeRepo. I also plan to change rpm-ostree to start using this API to hold references to base layers for client-side layering; it also today generates various refs. That said, if we still want to support multiple processes writing to a single repo (as happens on EndlessOS today) we still need to write refs; perhaps later we could add a concept of "generators" or something that create refs based on whatever logic? Another minor thing this fixes is that we had a printf inside the library; this propagates the pruned data to the higher level which can log however it likes. Closes: #1566 Approved by: jlebon
Diffstat (limited to 'src/libostree/ostree-sysroot.h')
-rw-r--r--src/libostree/ostree-sysroot.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libostree/ostree-sysroot.h b/src/libostree/ostree-sysroot.h
index 47cbb022..502cd750 100644
--- a/src/libostree/ostree-sysroot.h
+++ b/src/libostree/ostree-sysroot.h
@@ -123,6 +123,16 @@ gboolean ostree_sysroot_prepare_cleanup (OstreeSysroot *self,
GError **error);
_OSTREE_PUBLIC
+gboolean
+ostree_sysroot_cleanup_prune_repo (OstreeSysroot *sysroot,
+ OstreeRepoPruneOptions *options,
+ gint *out_objects_total,
+ gint *out_objects_pruned,
+ guint64 *out_pruned_object_size_total,
+ GCancellable *cancellable,
+ GError **error);
+
+_OSTREE_PUBLIC
gboolean ostree_sysroot_write_origin_file (OstreeSysroot *sysroot,
OstreeDeployment *deployment,
GKeyFile *new_origin,