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
This commit is contained in:
1 parent
371081d123
commit
9131d8a4cc
4 files changed
+92
-15
No files matched your search
@@ -20,6 +20,7 @@
|
||||
/* Add new symbols here. Release commits should copy this section into -released.sym. */
|
||||
LIBOSTREE_2018.6 {
|
||||
ostree_repo_traverse_reachable_refs;
|
||||
ostree_sysroot_cleanup_prune_repo;
|
||||
} LIBOSTREE_2018.5;
|
||||
|
||||
/* Stub section for the stable release *after* this development one; don't
|
||||
|
||||
Reference in new issue
Block a user