diff options
author | William Manley <will@williammanley.net> | 2018-01-13 15:30:17 +0000 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-01-16 18:59:06 +0000 |
commit | c5d6725d9141a5583addcca0caf726e24c430595 (patch) | |
tree | 96f263b88e02e0c2c51bf6eb3aaaec7127ee2bee /src/ostree/ot-admin-builtin-deploy.c | |
parent | ebc104d3c7671b2a84b83b14407359478b4150a4 (diff) | |
download | ostree-c5d6725d9141a5583addcca0caf726e24c430595.tar.gz |
ostree admin deploy: Refactor bringing cleaning into `main`
In the next commit I will add --no-prune which will affect cleaning. By
doing this refactor we avoid having to add a NO_PRUNE flag.
Closes: #1418
Approved by: cgwalters
Diffstat (limited to 'src/ostree/ot-admin-builtin-deploy.c')
-rw-r--r-- | src/ostree/ot-admin-builtin-deploy.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ostree/ot-admin-builtin-deploy.c b/src/ostree/ot-admin-builtin-deploy.c index 8da9dbc3..68d17e95 100644 --- a/src/ostree/ot-admin-builtin-deploy.c +++ b/src/ostree/ot-admin-builtin-deploy.c @@ -162,7 +162,7 @@ ot_admin_builtin_deploy (int argc, char **argv, OstreeCommandInvocation *invocat kargs_strv, &new_deployment, cancellable, error)) return FALSE; - OstreeSysrootSimpleWriteDeploymentFlags flags = 0; + OstreeSysrootSimpleWriteDeploymentFlags flags = OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN; if (opt_retain) flags |= OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN; else @@ -180,5 +180,10 @@ ot_admin_builtin_deploy (int argc, char **argv, OstreeCommandInvocation *invocat merge_deployment, flags, cancellable, error)) return FALSE; + /* And finally, cleanup of any leftover data. + */ + if (!ostree_sysroot_cleanup (self, cancellable, error)) + return FALSE; + return TRUE; } |