From 388ba4b49ace5a82723596072104706934361bcb Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 4 Feb 2017 10:39:52 -0500 Subject: [PATCH] fixup! Add `pending-base-commit` to status --- src/app/rpmostree-builtin-status.c | 8 ++++++-- src/daemon/rpmostreed-deployment-utils.c | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/rpmostree-builtin-status.c b/src/app/rpmostree-builtin-status.c index fd2d0072f9..0b85ff5abf 100644 --- a/src/app/rpmostree-builtin-status.c +++ b/src/app/rpmostree-builtin-status.c @@ -124,6 +124,7 @@ status_generic (RPMOSTreeSysroot *sysroot_proxy, guint64 t = 0; int serial; gboolean is_booted; + const gboolean was_first = first; const guint max_key_len = strlen ("PendingBaseVersion"); g_autoptr(GVariant) signatures = NULL; g_autofree char *timestamp_string = NULL; @@ -208,8 +209,11 @@ status_generic (RPMOSTreeSysroot *sysroot_proxy, } print_kv ("Commit", max_key_len, checksum); - /* Pending state, but only for the booted comit */ - if (is_booted) + /* Show any difference between the baseref vs head, but only for the + booted commit, and only if there isn't a pending deployment. Otherwise + it's either unnecessary or too noisy. + */ + if (is_booted && was_first) { const gchar *pending_checksum = NULL; const gchar *pending_version = NULL; diff --git a/src/daemon/rpmostreed-deployment-utils.c b/src/daemon/rpmostreed-deployment-utils.c index 688697c5ca..b6c3f0460e 100644 --- a/src/daemon/rpmostreed-deployment-utils.c +++ b/src/daemon/rpmostreed-deployment-utils.c @@ -209,13 +209,12 @@ rpmostreed_deployment_generate_variant (OstreeDeployment *deployment, base_checksum = ostree_commit_get_parent (commit); g_assert (base_checksum); g_variant_dict_insert (&dict, "base-checksum", "s", base_checksum); - sigs = rpmostreed_deployment_gpg_results (repo, refspec, base_checksum, &gpg_enabled); } else { base_checksum = csum; - sigs = rpmostreed_deployment_gpg_results (repo, refspec, csum, &gpg_enabled); } + sigs = rpmostreed_deployment_gpg_results (repo, refspec, base_checksum, &gpg_enabled); variant_add_commit_details (&dict, NULL, commit); if (!ostree_repo_resolve_rev (repo, refspec, TRUE,