diff --git a/src/txnupd.cpp b/src/txnupd.cpp index 9f67c82..36158c2 100644 --- a/src/txnupd.cpp +++ b/src/txnupd.cpp @@ -134,9 +134,16 @@ static bool setupTransactionalUpdate(PluginHandle * handle) { auto transactionRoot = handle->transaction.getRoot(); dnf_context_set_install_root(handle->context, transactionRoot.c_str()); - /* Let's prevent uninstallation of the plugin so that we don't break the system */ + /* Acquire the sack and goal so that we can apply settings to the transaction */ auto dnfSack = dnf_context_get_sack(handle->context); auto dnfGoal = dnf_context_get_goal(handle->context); + + /* Set installonly_limit to 1 to disable multiversioned kernel installation, + * as we don't need it for this type of transaction. + */ + dnf_sack_set_installonly_limit(dnfSack, 1); + + /* Prevent uninstallation of the plugin so that we don't break the system */ auto dnfPluginPkgQuery = hy_query_create(dnfSack); hy_query_filter(dnfPluginPkgQuery, HY_PKG_FILE, HY_EQ, TXNUPD_PLUGIN_PATH); auto dnfPluginPkgSet = hy_query_run_set(dnfPluginPkgQuery);