diff --git a/src/app/rpmostree-builtin-status.c b/src/app/rpmostree-builtin-status.c index a3b87b4d..8b478a26 100644 --- a/src/app/rpmostree-builtin-status.c +++ b/src/app/rpmostree-builtin-status.c @@ -476,7 +476,7 @@ print_one_deployment (RPMOSTreeSysroot *sysroot_proxy, g_autoptr(GVariant) signatures = g_variant_dict_lookup_value (dict, "signatures", G_VARIANT_TYPE ("av")); - if (!first) + if (!first && !opt_only_booted) g_print ("\n"); g_print ("%s ", is_booted ? libsd_special_glyph (BLACK_CIRCLE) : " "); @@ -890,7 +890,10 @@ print_deployments (RPMOSTreeSysroot *sysroot_proxy, booted_osname = osname; } - g_print ("Deployments:\n"); + if (opt_only_booted) + g_print ("BootedDeployment:\n"); + else + g_print ("Deployments:\n"); /* just unpack this so that each iteration doesn't have to dig for it */ const char *cached_update_deployment_id = NULL; diff --git a/tests/vmcheck/test-misc-1.sh b/tests/vmcheck/test-misc-1.sh index 06ad226b..e967b21a 100755 --- a/tests/vmcheck/test-misc-1.sh +++ b/tests/vmcheck/test-misc-1.sh @@ -117,6 +117,7 @@ echo "ok status doesn't require active PAM session" vm_rpmostree status -b > status.txt assert_streq $(grep -F -e 'ostree://' status.txt | wc -l) "1" +assert_file_has_content status.txt BootedDeployment: echo "ok status -b" # Reload as root https://github.com/projectatomic/rpm-ostree/issues/976