chantra / rpms / libdnf

Forked from rpms/libdnf 2 years ago
Clone

Blame SOURCES/0005-Exclude-module-pkgs-that-have-conflict.patch

844bdb
From 0f9e61f8325c59d06894079d43773346a70448e2 Mon Sep 17 00:00:00 2001
844bdb
From: Jaroslav Mracek <jmracek@redhat.com>
844bdb
Date: Mon, 11 Feb 2019 13:36:36 +0100
844bdb
Subject: [PATCH] Exclude module pkgs that have conflict
844bdb
844bdb
---
844bdb
 libdnf/module/ModulePackageContainer.cpp | 4 ++++
844bdb
 1 file changed, 4 insertions(+)
844bdb
844bdb
diff --git a/libdnf/module/ModulePackageContainer.cpp b/libdnf/module/ModulePackageContainer.cpp
844bdb
index a8c7483..964d55e 100644
844bdb
--- a/libdnf/module/ModulePackageContainer.cpp
844bdb
+++ b/libdnf/module/ModulePackageContainer.cpp
844bdb
@@ -518,6 +518,10 @@ ModulePackageContainer::Impl::moduleSolve(const std::vector<ModulePackagePtr> & 
844bdb
         problems = goal.describeAllProblemRules(false);
844bdb
         ret = goal.run(DNF_NONE);
844bdb
         if (ret) {
844bdb
+            // Conflicting modules has to be removed otherwice it could result than one of them will
844bdb
+            // be active
844bdb
+            auto conflictingPkgs = goal.listConflictPkgs(DNF_PACKAGE_STATE_AVAILABLE);
844bdb
+            dnf_sack_add_excludes(moduleSack, conflictingPkgs.get());
844bdb
             ret = goalWeak.run(DNF_NONE);
844bdb
             if (ret) {
844bdb
                 auto logger(libdnf::Log::getLogger());
844bdb
--
844bdb
libgit2 0.27.7
844bdb