compose: Print the goal
It's useful to see what's going to be installed before we do it.
This commit is contained in:
parent
9a95c0a18b
commit
f50e19dfd1
@ -365,6 +365,8 @@ install_packages_in_root (RpmOstreeTreeComposeContext *self,
|
||||
g_print ("Previous commit found, but without rpmostree.inputhash metadata key\n");
|
||||
}
|
||||
|
||||
rpmostree_print_transaction (hifctx);
|
||||
|
||||
/* --- Downloading packages --- */
|
||||
{ g_auto(GLnxConsoleRef) console = { 0, };
|
||||
gs_unref_object HifState *hifstate = hif_state_new ();
|
||||
|
@ -199,3 +199,30 @@ rpmostree_print_treepkg_diff (OstreeSysroot *sysroot,
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
rpmostree_print_transaction (HifContext *hifctx)
|
||||
{
|
||||
guint i;
|
||||
g_autoptr(GPtrArray) install;
|
||||
|
||||
install = hif_goal_get_packages (hif_context_get_goal (hifctx),
|
||||
HIF_PACKAGE_INFO_INSTALL,
|
||||
HIF_PACKAGE_INFO_REINSTALL,
|
||||
HIF_PACKAGE_INFO_DOWNGRADE,
|
||||
HIF_PACKAGE_INFO_UPDATE,
|
||||
-1);
|
||||
|
||||
g_print ("Transaction: %u packages\n", install->len);
|
||||
|
||||
if (install->len == 0)
|
||||
g_print (" (empty)\n");
|
||||
else
|
||||
{
|
||||
for (i = 0; i < install->len; i++)
|
||||
{
|
||||
HyPackage pkg = install->pdata[i];
|
||||
g_print (" %s\n", hif_package_get_nevra (pkg));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,3 +34,6 @@ gboolean
|
||||
rpmostree_print_treepkg_diff (OstreeSysroot *sysroot,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
void
|
||||
rpmostree_print_transaction (HifContext *context);
|
||||
|
Loading…
Reference in New Issue
Block a user