From c30e63f28387684bc8db846aec5ad940587cefb9 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 13 Sep 2017 09:29:49 -0400 Subject: [PATCH] compose: Clear libdnf context before postprocessing This ensures we close the rpm database before we start moving things around during postprocessing, and avoids a warning about the rpmdb going missing being printed at the end of a compose. Related: https://github.com/projectatomic/rpm-ostree/issues/987 Closes: #989 Approved by: jlebon --- src/app/rpmostree-compose-builtin-tree.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/rpmostree-compose-builtin-tree.c b/src/app/rpmostree-compose-builtin-tree.c index b256b6b4..e308b6c9 100644 --- a/src/app/rpmostree-compose-builtin-tree.c +++ b/src/app/rpmostree-compose-builtin-tree.c @@ -915,6 +915,11 @@ impl_compose_tree (const char *treefile_pathstr, } } + /* Destroy this now so the libdnf stack won't have any references + * into the filesystem before we manipulate it. + */ + g_clear_object (&self->corectx); + if (g_strcmp0 (g_getenv ("RPM_OSTREE_BREAK"), "post-yum") == 0) return FALSE;