app/status: Tweak output with --booted
Fix `--booted` was printing an extra line after `Deployments:`. While we're there, also update the section name to `BootedDeployment:` in that case to be more correct. (We're not printing all the deployments, only the booted deployment.) Closes: #1503 Approved by: cgwalters
This commit is contained in:
parent
45e162fb69
commit
4ccad2f64b
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user