daemon/cleanup: Make use of new libostree API to fix TODO

We now avoid doing cleanup twice.

Closes: #709
Approved by: jlebon
This commit is contained in:
Colin Walters 2017-03-27 17:03:29 -04:00 committed by Atomic Bot
parent 9260d828a8
commit 999e0034ef

View File

@ -1108,9 +1108,12 @@ cleanup_transaction_execute (RpmostreedTransaction *transaction,
cleanup_rollback);
if (new_deployments)
{
/* TODO - expose the skip cleanup flag in libostree, use it here */
if (!ostree_sysroot_write_deployments (sysroot, new_deployments, cancellable, error))
OstreeSysrootWriteDeploymentsOpts write_opts = { .do_postclean = FALSE };
if (!ostree_sysroot_write_deployments_with_options (sysroot, new_deployments,
&write_opts, cancellable, error))
return FALSE;
/* And ensure we fall through to base cleanup */
self->flags |= RPMOSTREE_TRANSACTION_CLEANUP_BASE;
}