sysroot: Prep refactoring of cleanup logic

For future work I'm going to tweak how we handle cleanup, and
the private cleanup flags didn't really end up being used - we
only specify "prune repo or not".  So fold that into a boolean for now.

The sysroot deploy logic then has a single "do_postclean" boolean, which is all
I want to expose as public API.

Closes: #744
Approved by: jlebon
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2017-03-20 20:16:12 +00:00
1 parent ec2f52e625
commit 5d413dff88
4 files changed
+31 -57

No files matched your search

+5 -12
View File
@@ -109,21 +109,14 @@ gboolean _ostree_sysroot_query_bootloader (OstreeSysroot *sysroot,
gboolean _ostree_sysroot_bump_mtime (OstreeSysroot *sysroot,
GError **error);
typedef enum {
OSTREE_SYSROOT_CLEANUP_BOOTVERSIONS = 1 << 0,
OSTREE_SYSROOT_CLEANUP_DEPLOYMENTS = 1 << 1,
OSTREE_SYSROOT_CLEANUP_PRUNE_REPO = 1 << 2,
OSTREE_SYSROOT_CLEANUP_ALL = 0xffff
} OstreeSysrootCleanupFlags;
gboolean _ostree_sysroot_piecemeal_cleanup (OstreeSysroot *sysroot,
OstreeSysrootCleanupFlags flags,
GCancellable *cancellable,
GError **error);
gboolean _ostree_sysroot_cleanup_internal (OstreeSysroot *sysroot,
gboolean prune_repo,
GCancellable *cancellable,
GError **error);
gboolean _ostree_sysroot_write_deployments_internal (OstreeSysroot *self,
GPtrArray *new_deployments,
OstreeSysrootCleanupFlags cleanup_flags,
gboolean do_clean,
GCancellable *cancellable,
GError **error);