dcavalca / rpms / libdnf

Forked from rpms/libdnf 2 years ago
Clone

Blame SOURCES/0006-Revert-Add-additional-fallback-for-module-resolve.patch

2e24b4
From 15a06ef27466f42a8dc39823385f0ca655e80b12 Mon Sep 17 00:00:00 2001
2e24b4
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
2e24b4
Date: Sun, 25 Apr 2021 19:47:53 +0200
2e24b4
Subject: [PATCH 06/19] Revert "Add additional fallback for module resolve"
2e24b4
2e24b4
This reverts commit fc98ce725181a77bbe0ab157d40443467612c0c0.
2e24b4
---
2e24b4
 libdnf/module/ModulePackageContainer.cpp | 32 ++++++++----------------
2e24b4
 1 file changed, 11 insertions(+), 21 deletions(-)
2e24b4
2e24b4
diff --git a/libdnf/module/ModulePackageContainer.cpp b/libdnf/module/ModulePackageContainer.cpp
2e24b4
index ee90056c..e19db08b 100644
2e24b4
--- a/libdnf/module/ModulePackageContainer.cpp
2e24b4
+++ b/libdnf/module/ModulePackageContainer.cpp
2e24b4
@@ -702,33 +702,23 @@ ModulePackageContainer::Impl::moduleSolve(const std::vector<ModulePackage *> & m
2e24b4
     std::vector<std::vector<std::string>> problems;
2e24b4
     auto problemType = ModulePackageContainer::ModuleErrorType::NO_ERROR;
2e24b4
     if (ret) {
2e24b4
-        // Goal run ignor problem in defaults
2e24b4
         problems = goal.describeAllProblemRules(false);
2e24b4
         ret = goal.run(DNF_FORCE_BEST);
2e24b4
         if (ret) {
2e24b4
-            // Goal run ignor problem in defaults and in latest
2e24b4
-            ret = goal.run(DNF_NONE);
2e24b4
+            // Conflicting modules has to be removed otherwice it could result than one of them will
2e24b4
+            // be active
2e24b4
+            auto conflictingPkgs = goal.listConflictPkgs(DNF_PACKAGE_STATE_AVAILABLE);
2e24b4
+            dnf_sack_add_excludes(moduleSack, conflictingPkgs.get());
2e24b4
+            ret = goalWeak.run(DNF_NONE);
2e24b4
             if (ret) {
2e24b4
-                // Conflicting modules has to be removed otherwice it could result than one of them will
2e24b4
-                // be active
2e24b4
-                auto conflictingPkgs = goal.listConflictPkgs(DNF_PACKAGE_STATE_AVAILABLE);
2e24b4
-                dnf_sack_add_excludes(moduleSack, conflictingPkgs.get());
2e24b4
-                ret = goalWeak.run(DNF_NONE);
2e24b4
-                if (ret) {
2e24b4
-                    auto logger(Log::getLogger());
2e24b4
-                    logger->critical("Modularity filtering totally broken\n");
2e24b4
-                    problemType = ModulePackageContainer::ModuleErrorType::CANNOT_RESOLVE_MODULES;
2e24b4
-                    activatedModules.reset();
2e24b4
-                } else {
2e24b4
-                    problemType = ModulePackageContainer::ModuleErrorType::ERROR;
2e24b4
-                    Query query(moduleSack, Query::ExcludeFlags::IGNORE_EXCLUDES);
2e24b4
-                    goal2name_query(goalWeak, query);
2e24b4
-                    activatedModules.reset(new PackageSet(*query.runSet()));
2e24b4
-                }
2e24b4
+                auto logger(Log::getLogger());
2e24b4
+                logger->critical("Modularity filtering totally broken\n");
2e24b4
+                problemType = ModulePackageContainer::ModuleErrorType::CANNOT_RESOLVE_MODULES;
2e24b4
+                activatedModules.reset();
2e24b4
             } else {
2e24b4
-                problemType = ModulePackageContainer::ModuleErrorType::ERROR_IN_DEFAULTS;
2e24b4
+                problemType = ModulePackageContainer::ModuleErrorType::ERROR;
2e24b4
                 Query query(moduleSack, Query::ExcludeFlags::IGNORE_EXCLUDES);
2e24b4
-                goal2name_query(goal, query);
2e24b4
+                goal2name_query(goalWeak, query);
2e24b4
                 activatedModules.reset(new PackageSet(*query.runSet()));
2e24b4
             }
2e24b4
         } else {
2e24b4
-- 
2e24b4
2.31.1
2e24b4