PackageKit/0006-Allow-module-filtering.patch
Adam Williamson 8631a4dc21 Backport several more fixes from master for libdnf compat
This should fix several bugs, including hopefully the 'runaway'
bug recently discussed on test@ list (I'm hoping this is fixed
by the 'Adapt for DnfAdvisory changes' patch).
2018-09-22 13:07:42 -07:00

37 lines
1.0 KiB
Diff

From 1a29475d35d2a054901eaad6f121980577b2c962 Mon Sep 17 00:00:00 2001
From: Jaroslav Mracek <jmracek@redhat.com>
Date: Tue, 12 Jun 2018 08:57:54 +0200
Subject: [PATCH 06/13] Allow module filtering
It should disable packages from disabled modules.
The patch requires libdnf-0.15.0
---
backends/dnf/pk-backend-dnf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/backends/dnf/pk-backend-dnf.c b/backends/dnf/pk-backend-dnf.c
index ddfcd4231..414a13f32 100644
--- a/backends/dnf/pk-backend-dnf.c
+++ b/backends/dnf/pk-backend-dnf.c
@@ -39,6 +39,7 @@
#include <libdnf/hy-packageset.h>
#include <libdnf/hy-query.h>
#include <libdnf/dnf-version.h>
+#include <libdnf/dnf-sack.h>
#include <libdnf/hy-util.h>
#include <librepo/librepo.h>
@@ -799,6 +800,8 @@ dnf_utils_create_sack_for_filters (PkBackendJob *job,
return NULL;
}
+ dnf_sack_filter_modules (sack, dnf_context_get_repos (job_data->context), install_root);
+
/* save in cache */
g_mutex_lock (&priv->sack_mutex);
cache_item = g_slice_new (DnfSackCacheItem);
--
2.19.0