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:
1 parent
ec2f52e625
commit
5d413dff88
4 files changed
+31
-57
No files matched your search
@@ -1703,14 +1703,13 @@ ostree_sysroot_write_deployments (OstreeSysroot *self,
|
||||
GError **error)
|
||||
{
|
||||
return _ostree_sysroot_write_deployments_internal (self, new_deployments,
|
||||
OSTREE_SYSROOT_CLEANUP_ALL,
|
||||
cancellable, error);
|
||||
TRUE, cancellable, error);
|
||||
}
|
||||
|
||||
gboolean
|
||||
_ostree_sysroot_write_deployments_internal (OstreeSysroot *self,
|
||||
GPtrArray *new_deployments,
|
||||
OstreeSysrootCleanupFlags cleanup_flags,
|
||||
gboolean do_clean,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
@@ -1938,11 +1937,13 @@ _ostree_sysroot_write_deployments_internal (OstreeSysroot *self,
|
||||
|
||||
/* And finally, cleanup of any leftover data.
|
||||
*/
|
||||
if (!_ostree_sysroot_piecemeal_cleanup (self, cleanup_flags,
|
||||
cancellable, error))
|
||||
if (do_clean)
|
||||
{
|
||||
g_prefix_error (error, "Performing final cleanup: ");
|
||||
goto out;
|
||||
if (!ostree_sysroot_cleanup (self, cancellable, error))
|
||||
{
|
||||
g_prefix_error (error, "Performing final cleanup: ");
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
ret = TRUE;
|
||||
|
||||
Reference in new issue
Block a user