From d153ecec9dc14785157a0eb62795fe9da43d7278 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sun, 24 Jul 2016 14:26:21 -0400 Subject: [PATCH] Don't print transaction in middle of upgrade overlay output ...but still do print it for `compose tree` and `container`. This is more followup to #403, where I noticed we were printing just the overlay transaction in the middle of `Overlaying...`. Since we're now printing the package diff again at the end, let's just rely on that rather than show the user over and over which packages they requested. Closes: #403 Closes: #404 Approved by: jlebon --- src/app/rpmostree-compose-builtin-tree.c | 2 ++ src/app/rpmostree-container-builtins.c | 4 ++++ src/libpriv/rpmostree-core.c | 2 -- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/rpmostree-compose-builtin-tree.c b/src/app/rpmostree-compose-builtin-tree.c index 60514fda..ecea607a 100644 --- a/src/app/rpmostree-compose-builtin-tree.c +++ b/src/app/rpmostree-compose-builtin-tree.c @@ -320,6 +320,8 @@ install_packages_in_root (RpmOstreeTreeComposeContext *self, if (!rpmostree_context_prepare_install (ctx, &hifinstall, cancellable, error)) goto out; + rpmostree_print_transaction (hifctx); + if (json_object_has_member (treedata, "add-files")) add_files = json_object_get_array_member (treedata, "add-files"); diff --git a/src/app/rpmostree-container-builtins.c b/src/app/rpmostree-container-builtins.c index 355206c1..fa6b254a 100644 --- a/src/app/rpmostree-container-builtins.c +++ b/src/app/rpmostree-container-builtins.c @@ -301,6 +301,8 @@ rpmostree_container_builtin_assemble (int argc, if (!rpmostree_context_prepare_install (rocctx->ctx, &install, cancellable, error)) goto out; + rpmostree_print_transaction (rpmostree_context_get_hif (rocctx->ctx)); + /* --- Download as necessary --- */ if (!rpmostree_context_download (rocctx->ctx, install, cancellable, error)) goto out; @@ -507,6 +509,8 @@ rpmostree_container_builtin_upgrade (int argc, char **argv, GCancellable *cancel cancellable, error)) goto out; + rpmostree_print_transaction (rpmostree_context_get_hif (rocctx->ctx)); + { g_autofree char *new_state_sha512 = rpmostree_context_get_state_sha512 (rocctx->ctx); if (strcmp (new_state_sha512, previous_state_sha512) == 0) diff --git a/src/libpriv/rpmostree-core.c b/src/libpriv/rpmostree-core.c index 7309b514..33388442 100644 --- a/src/libpriv/rpmostree-core.c +++ b/src/libpriv/rpmostree-core.c @@ -999,8 +999,6 @@ rpmostree_context_prepare_install (RpmOstreeContext *self, ret_install, error)) goto out; - rpmostree_print_transaction (hifctx); - ret = TRUE; *out_install = g_steal_pointer (&ret_install); out: