From 363e213f18690268c0da2d8cef9511d36c021e63 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 29 Aug 2016 15:15:05 -0400 Subject: [PATCH] upgrader: Avoid cleaning system repo twice We need to manage our baselayer refs independently of the deployment being written by libostree, so suppress the default clean; we'll do it in rpm-ostree. I noticed the `Freed objects:` message twice and always wondered why until today. Closes: #437 Approved by: jlebon --- src/daemon/rpmostree-sysroot-upgrader.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/daemon/rpmostree-sysroot-upgrader.c b/src/daemon/rpmostree-sysroot-upgrader.c index 956c7f99..e382524d 100644 --- a/src/daemon/rpmostree-sysroot-upgrader.c +++ b/src/daemon/rpmostree-sysroot-upgrader.c @@ -1444,11 +1444,6 @@ sysroot_upgrader_cleanup (RpmOstreeSysrootUpgrader *self, GCancellable *cancellable, GError **error) { - glnx_unref_object OstreeRepo *pkgcache_repo = NULL; - - if (!get_pkgcache_repo (repo, &pkgcache_repo, cancellable, error)) - return FALSE; - /* regenerate the baselayer refs in case we just kicked out an ancient layered * deployment whose base layer is not needed anymore */ if (!generate_baselayer_refs (self, repo, cancellable, error)) @@ -1526,15 +1521,10 @@ rpmostree_sysroot_upgrader_deploy (RpmOstreeSysrootUpgrader *self, if (!ostree_sysroot_simple_write_deployment (self->sysroot, self->osname, new_deployment, self->merge_deployment, - 0, + OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN, cancellable, error)) goto out; - /* regenerate the baselayer refs in case we just kicked out an ancient layered - * deployment whose base layer is not needed anymore */ - if (!generate_baselayer_refs (self, repo, cancellable, error)) - goto out; - if (!sysroot_upgrader_cleanup (self, repo, cancellable, error)) goto out;