From 982d33d04f0390f54ad783914f4dc25cf8913b49 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 5 Jun 2015 18:49:38 +0200 Subject: [PATCH 3/4] hif: Improve depsolving for parallel kernel installs Make sure the magic necessary for parallel kernel installs is properly set up before depsolving an upgrade goal. This ensures that hawkey has enough information to figure out what to do in more complicated situations, such as the one described in https://bugzilla.redhat.com/show_bug.cgi?id=1205649 --- backends/hif/pk-backend-hif.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backends/hif/pk-backend-hif.c b/backends/hif/pk-backend-hif.c index 48d456a..4d4151c 100644 --- a/backends/hif/pk-backend-hif.c +++ b/backends/hif/pk-backend-hif.c @@ -860,6 +860,7 @@ pk_backend_search_thread (PkBackendJob *job, GVariant *params, gpointer user_dat HyQuery query = NULL; HySack sack = NULL; PkBackendHifJobData *job_data = pk_backend_job_get_user_data (job); + PkBackendHifPrivate *priv = pk_backend_get_user_data (job_data->backend); PkBitfield filters = 0; _cleanup_error_free_ GError *error = NULL; _cleanup_strv_free_ gchar **search = NULL; @@ -947,6 +948,10 @@ pk_backend_search_thread (PkBackendJob *job, GVariant *params, gpointer user_dat pkglist = hif_utils_run_query_with_filters (job_data->backend, sack, query, filters); break; case PK_ROLE_ENUM_GET_UPDATES: + /* set up the sack for packages that should only ever be installed, never updated */ + hy_sack_set_installonly (sack, hif_context_get_installonly_pkgs (priv->context)); + hy_sack_set_installonly_limit (sack, hif_context_get_installonly_limit (priv->context)); + job_data->goal = hy_goal_create (sack); hy_goal_upgrade_all (job_data->goal); ret = hif_goal_depsolve (job_data->goal, &error); -- 2.4.2