PackageKit/0001-Allow-module-filtering.patch
Stephen Gallagher fff14f2575
Add patch to support modularity
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2018-07-30 11:34:41 -04:00

45 lines
1.4 KiB
Diff

From 23a355776d123723ac974afb214a93f1b2ee2f35 Mon Sep 17 00:00:00 2001
From: Jaroslav Mracek <jmracek@redhat.com>
Date: Tue, 12 Jun 2018 08:57:54 +0200
Subject: [PATCH 1/2] 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 d997dee67c7d736a2032f8b6b15bdcb2d1f9e473..1131aa4ab079b82dbe17c97ca6e239a754540f38 100644
--- a/backends/dnf/pk-backend-dnf.c
+++ b/backends/dnf/pk-backend-dnf.c
@@ -37,10 +37,11 @@
#include <libdnf/dnf-advisory.h>
#include <libdnf/dnf-advisoryref.h>
#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>
#include "dnf-backend-vendor.h"
#include "dnf-backend.h"
@@ -797,10 +798,12 @@ dnf_utils_create_sack_for_filters (PkBackendJob *job,
ret = dnf_state_done (state, error);
if (!ret)
return NULL;
}
+ dnf_sack_filter_modules (sack, dnf_context_get_repos (job_data->context), install_root, NULL);
+
/* save in cache */
g_mutex_lock (&priv->sack_mutex);
cache_item = g_slice_new (DnfSackCacheItem);
cache_item->key = g_strdup (cache_key);
cache_item->sack = g_object_ref (sack);
--
2.17.1