Blob Blame History Raw
diff --color -urN rpm-ostree-2022.10.90.g4abaf4b4-orig/src/app/rpmostree-builtin-status.cxx rpm-ostree-2022.10.90.g4abaf4b4/src/app/rpmostree-builtin-status.cxx
--- rpm-ostree-2022.10.90.g4abaf4b4-orig/src/app/rpmostree-builtin-status.cxx	2022-08-16 08:40:32.000000000 -0400
+++ rpm-ostree-2022.10.90.g4abaf4b4/src/app/rpmostree-builtin-status.cxx	2023-02-07 19:56:17.018048420 -0500
@@ -489,10 +489,7 @@
   g_autoptr (GVariant) reposdata = g_variant_dict_lookup_value (
       commit_meta, "rpmostree.rpmmd-repos", G_VARIANT_TYPE ("aa{sv}"));
 
-  if (!reposdata)
-    return;
-
-  const guint n = g_variant_n_children (reposdata);
+  const guint n = reposdata ? g_variant_n_children (reposdata) : 0;
   if (n == 0 || !opt_verbose)
     {
       /* no repos to print, so this is just a pure kv print */
diff --color -urN rpm-ostree-2022.10.90.g4abaf4b4-orig/tests/vmcheck/test-misc-2.sh rpm-ostree-2022.10.90.g4abaf4b4/tests/vmcheck/test-misc-2.sh
--- rpm-ostree-2022.10.90.g4abaf4b4-orig/tests/vmcheck/test-misc-2.sh	2022-08-16 08:40:32.000000000 -0400
+++ rpm-ostree-2022.10.90.g4abaf4b4/tests/vmcheck/test-misc-2.sh	2023-02-07 19:57:05.111019172 -0500
@@ -26,6 +26,10 @@
 
 # More miscellaneous tests
 
+# Verify that the commit is printed in the output
+vm_rpmostree status > status.txt
+assert_file_has_content status.txt 'Commit:'
+
 # Locked finalization
 booted_csum=$(vm_get_booted_csum)
 commit=$(vm_cmd ostree commit -b vmcheck --tree=ref=vmcheck)