Add patch to support modularity

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2018-07-30 09:59:38 -04:00
parent 01c2d39341
commit fff14f2575
No known key found for this signature in database
GPG Key ID: 7A25556236BAA3A3
3 changed files with 87 additions and 2 deletions

View File

@ -0,0 +1,44 @@
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

View File

@ -0,0 +1,34 @@
From 372b746c0cd2fcbf8c695a3a89834e58f55ee2a7 Mon Sep 17 00:00:00 2001
From: Jaroslav Mracek <jmracek@redhat.com>
Date: Tue, 6 Mar 2018 14:37:50 +0100
Subject: [PATCH 2/2] Reflect latest changes in libdnf
Requires: libdnf-0.13.0+
G object DnfPackageSet in libdnf was replaced by c++ class therefore
g_object_unref cannot be used anymore, but the new dnf_packageset_free has to be
used instead.
---
backends/dnf/pk-backend-dnf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backends/dnf/pk-backend-dnf.c b/backends/dnf/pk-backend-dnf.c
index a34c05b799dd2baf2bbd72492b66b3112af386ae..414a13f320a2e4fb3cff4f8ad4ae661c6bcd41b6 100644
--- a/backends/dnf/pk-backend-dnf.c
+++ b/backends/dnf/pk-backend-dnf.c
@@ -851,11 +851,11 @@ dnf_utils_run_query_with_newest_filter (DnfSack *sack, HyQuery query)
g_ptr_array_add (results, g_object_ref (pkg));
}
hy_query_free (query_tmp);
g_ptr_array_unref (results_tmp);
- g_object_unref (pkgset);
+ dnf_packageset_free(pkgset);
return results;
}
/**
--
2.17.1

View File

@ -4,7 +4,7 @@
%global bundled_libdnf 0
%global glib2_version 2.54.0
%global libdnf_version 0.7.0
%global libdnf_version 0.16.0
%if 0%{?bundled_libdnf}
%global commit1 fe5a08bca7e2599798af7778917da2cc31f1460e
@ -14,7 +14,7 @@
Summary: Package management service
Name: PackageKit
Version: 1.1.10
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2+ and LGPLv2+
URL: http://www.freedesktop.org/software/PackageKit/
Source0: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
@ -29,6 +29,8 @@ Provides: bundled(libdnf) = 0.7.0
# Fedora-specific: set Vendor.conf up for Fedora.
Patch0: PackageKit-0.3.8-Fedora-Vendor.conf.patch
Patch1: 0001-Allow-module-filtering.patch
Patch2: 0002-Reflect-latest-changes-in-libdnf.patch
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: xmlto
@ -189,6 +191,8 @@ tar -xf %{S:1}
%endif
%patch0 -p1 -b .fedora
%patch1 -p1 -b .modularity
%patch2 -p1 -b .libdnf
%build
%if 0%{?bundled_libdnf}
@ -341,6 +345,9 @@ systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || :
%{_datadir}/vala/vapi/packagekit-glib2.vapi
%changelog
* Tue Jul 24 2018 Stephen Gallagher <sgallagh@redhat.com> - 1.1.10-4
- Add patch to support modularity
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild