Add patches to resolve module enablement in PackageKit
This commit is contained in:
parent
f535e0a04d
commit
fbc36faefb
58
0004-Relocate-ModuleContainer-save-hook-RhBug1632518.patch
Normal file
58
0004-Relocate-ModuleContainer-save-hook-RhBug1632518.patch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
From 744a95e49b6f29aa65bc5b28e0e821c38c481581 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jaroslav Mracek <jmracek@redhat.com>
|
||||||
|
Date: Fri, 19 Oct 2018 15:44:39 +0200
|
||||||
|
Subject: [PATCH] Relocate ModuleContainer save hook (RhBug:1632518)
|
||||||
|
|
||||||
|
---
|
||||||
|
libdnf/dnf-context.cpp | 5 +----
|
||||||
|
libdnf/dnf-transaction.cpp | 5 +++++
|
||||||
|
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp
|
||||||
|
index 141af3a..db1741c 100644
|
||||||
|
--- a/libdnf/dnf-context.cpp
|
||||||
|
+++ b/libdnf/dnf-context.cpp
|
||||||
|
@@ -1879,10 +1879,7 @@ dnf_context_run(DnfContext *context, GCancellable *cancellable, GError **error)
|
||||||
|
error);
|
||||||
|
if (!ret)
|
||||||
|
return FALSE;
|
||||||
|
- auto moduleContainer = dnf_sack_get_module_container(priv->sack);
|
||||||
|
- if (moduleContainer) {
|
||||||
|
- moduleContainer->save();
|
||||||
|
- }
|
||||||
|
+
|
||||||
|
/* this sack is no longer valid */
|
||||||
|
g_object_unref(priv->sack);
|
||||||
|
priv->sack = NULL;
|
||||||
|
diff --git a/libdnf/dnf-transaction.cpp b/libdnf/dnf-transaction.cpp
|
||||||
|
index 5c078a0..0d948d7 100644
|
||||||
|
--- a/libdnf/dnf-transaction.cpp
|
||||||
|
+++ b/libdnf/dnf-transaction.cpp
|
||||||
|
@@ -38,12 +38,14 @@
|
||||||
|
#include "dnf-package.h"
|
||||||
|
#include "dnf-rpmts.h"
|
||||||
|
#include "dnf-sack.h"
|
||||||
|
+#include "dnf-sack-private.hpp"
|
||||||
|
#include "dnf-transaction.h"
|
||||||
|
#include "dnf-types.h"
|
||||||
|
#include "dnf-utils.h"
|
||||||
|
#include "hy-query.h"
|
||||||
|
#include "hy-util-private.hpp"
|
||||||
|
|
||||||
|
+#include "module/ModulePackageContainer.hpp"
|
||||||
|
#include "transaction/Swdb.hpp"
|
||||||
|
#include "transaction/Transformer.hpp"
|
||||||
|
#include "utils/bgettext/bgettext-lib.h"
|
||||||
|
@@ -1435,6 +1437,9 @@ dnf_transaction_commit(DnfTransaction *transaction, HyGoal goal, DnfState *state
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (auto moduleContainer = dnf_sack_get_module_container(dnf_context_get_sack(priv->context)))
|
||||||
|
+ moduleContainer->save();
|
||||||
|
+
|
||||||
|
/* all sacks are invalid now */
|
||||||
|
dnf_context_invalidate_full(priv->context,
|
||||||
|
"transaction performed",
|
||||||
|
--
|
||||||
|
libgit2 0.26.7
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
From 1e7118d01d9ba92f759cd9669f9d0dd5af0619d6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jaroslav Mracek <jmracek@redhat.com>
|
||||||
|
Date: Sat, 20 Oct 2018 01:13:49 +0200
|
||||||
|
Subject: [PATCH] Test if sack is present and run save module persistor (RhBug:1632518)
|
||||||
|
|
||||||
|
---
|
||||||
|
libdnf/dnf-transaction.cpp | 7 +++++--
|
||||||
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libdnf/dnf-transaction.cpp b/libdnf/dnf-transaction.cpp
|
||||||
|
index 0d948d7..b89eace 100644
|
||||||
|
--- a/libdnf/dnf-transaction.cpp
|
||||||
|
+++ b/libdnf/dnf-transaction.cpp
|
||||||
|
@@ -1437,8 +1437,11 @@ dnf_transaction_commit(DnfTransaction *transaction, HyGoal goal, DnfState *state
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (auto moduleContainer = dnf_sack_get_module_container(dnf_context_get_sack(priv->context)))
|
||||||
|
- moduleContainer->save();
|
||||||
|
+ if (DnfSack * sack = hy_goal_get_sack(goal)) {
|
||||||
|
+ if (auto moduleContainer = dnf_sack_get_module_container(sack)) {
|
||||||
|
+ moduleContainer->save();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/* all sacks are invalid now */
|
||||||
|
dnf_context_invalidate_full(priv->context,
|
||||||
|
--
|
||||||
|
libgit2 0.26.7
|
||||||
|
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
Name: libdnf
|
Name: libdnf
|
||||||
Version: 0.22.0
|
Version: 0.22.0
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: Library providing simplified C and Python API to libsolv
|
Summary: Library providing simplified C and Python API to libsolv
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/rpm-software-management/libdnf
|
URL: https://github.com/rpm-software-management/libdnf
|
||||||
@ -39,6 +39,8 @@ Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
|||||||
Patch0001: 0001-Modify-solver_describe_decision-to-report-cleaned-RhBug1486749.patch
|
Patch0001: 0001-Modify-solver_describe_decision-to-report-cleaned-RhBug1486749.patch
|
||||||
Patch0002: 0002-history-Fix-crash-in-TransactionItemaddReplacedBy.patch
|
Patch0002: 0002-history-Fix-crash-in-TransactionItemaddReplacedBy.patch
|
||||||
Patch0003: 0003-swdb-create-persistent-WAL-files-RhBug1640235.patch
|
Patch0003: 0003-swdb-create-persistent-WAL-files-RhBug1640235.patch
|
||||||
|
Patch0004: 0004-Relocate-ModuleContainer-save-hook-RhBug1632518.patch
|
||||||
|
Patch0005: 0005-Test-if-sack-is-present-and-run-save-module-persistor-RhBug1632518.patch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -246,6 +248,10 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 23 2018 Jaroslav Mracek <jmracek@redhat.com> - 0.22.0-6
|
||||||
|
- Add patch Relocate-ModuleContainer-save-hook-RhBug1632518
|
||||||
|
- Add patch Test-if-sack-is-present-and-run-save-module-persistor-RhBug1632518
|
||||||
|
|
||||||
* Sat Oct 20 2018 Jaroslav Mracek <jmracek@redhat.com> - 0.22.0-5
|
* Sat Oct 20 2018 Jaroslav Mracek <jmracek@redhat.com> - 0.22.0-5
|
||||||
- remove problematic patch Relocate-ModuleContainer-save-hook-RhBug1632518
|
- remove problematic patch Relocate-ModuleContainer-save-hook-RhBug1632518
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user