Blame SOURCES/0005-Revert-Report-a-new-type-of-the-module-resolve-error.patch

379fd8
From ce301450c39ebbd9fc5ec0897af2df766015e1bd Mon Sep 17 00:00:00 2001
379fd8
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
379fd8
Date: Sun, 25 Apr 2021 19:47:53 +0200
379fd8
Subject: [PATCH 05/19] Revert "Report a new type of the module resolve error"
379fd8
379fd8
This reverts commit 9235436672fa413d5ac94f52a534b5abe90b5c7f.
379fd8
---
379fd8
 libdnf/dnf-context.cpp                   |  4 ----
379fd8
 libdnf/module/ModulePackageContainer.cpp | 17 ++++++++++++-----
379fd8
 libdnf/module/ModulePackageContainer.hpp | 10 ++++------
379fd8
 3 files changed, 16 insertions(+), 15 deletions(-)
379fd8
379fd8
diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp
379fd8
index ccb6fe83..55af2b26 100644
379fd8
--- a/libdnf/dnf-context.cpp
379fd8
+++ b/libdnf/dnf-context.cpp
379fd8
@@ -3252,10 +3252,6 @@ report_problems(const std::vector
379fd8
             case libdnf::ModulePackageContainer::ModuleErrorType::ERROR_IN_DEFAULTS:
379fd8
                 logger->warning(tfm::format(_("Modular dependency problem with Defaults: %s"), report.c_str()));
379fd8
                 break;
379fd8
-            case libdnf::ModulePackageContainer::ModuleErrorType::ERROR_IN_LATEST:
379fd8
-                logger->warning(tfm::format(_("Modular dependency problem with the lates modules: %s"),
379fd8
-                                            report.c_str()));
379fd8
-                break;
379fd8
             case libdnf::ModulePackageContainer::ModuleErrorType::ERROR:
379fd8
                 logger->error(tfm::format(_("Modular dependency problem: %s"), report.c_str()));
379fd8
                 return_error = true;
379fd8
diff --git a/libdnf/module/ModulePackageContainer.cpp b/libdnf/module/ModulePackageContainer.cpp
379fd8
index 1bfdd8c1..ee90056c 100644
379fd8
--- a/libdnf/module/ModulePackageContainer.cpp
379fd8
+++ b/libdnf/module/ModulePackageContainer.cpp
379fd8
@@ -725,16 +725,23 @@ ModulePackageContainer::Impl::moduleSolve(const std::vector<ModulePackage *> & m
379fd8
                     goal2name_query(goalWeak, query);
379fd8
                     activatedModules.reset(new PackageSet(*query.runSet()));
379fd8
                 }
379fd8
-                return make_pair(problems, problemType);
379fd8
+            } else {
379fd8
+                problemType = ModulePackageContainer::ModuleErrorType::ERROR_IN_DEFAULTS;
379fd8
+                Query query(moduleSack, Query::ExcludeFlags::IGNORE_EXCLUDES);
379fd8
+                goal2name_query(goal, query);
379fd8
+                activatedModules.reset(new PackageSet(*query.runSet()));
379fd8
             }
379fd8
-            problemType = ModulePackageContainer::ModuleErrorType::ERROR_IN_LATEST;
379fd8
         } else {
379fd8
             problemType = ModulePackageContainer::ModuleErrorType::ERROR_IN_DEFAULTS;
379fd8
+            Query query(moduleSack, Query::ExcludeFlags::IGNORE_EXCLUDES);
379fd8
+            goal2name_query(goal, query);
379fd8
+            activatedModules.reset(new PackageSet(*query.runSet()));
379fd8
         }
379fd8
+    } else {
379fd8
+        Query query(moduleSack, Query::ExcludeFlags::IGNORE_EXCLUDES);
379fd8
+        goal2name_query(goal, query);
379fd8
+        activatedModules.reset(new PackageSet(*query.runSet()));
379fd8
     }
379fd8
-    Query query(moduleSack, Query::ExcludeFlags::IGNORE_EXCLUDES);
379fd8
-    goal2name_query(goal, query);
379fd8
-    activatedModules.reset(new PackageSet(*query.runSet()));
379fd8
     return make_pair(problems, problemType);
379fd8
 }
379fd8
 
379fd8
diff --git a/libdnf/module/ModulePackageContainer.hpp b/libdnf/module/ModulePackageContainer.hpp
379fd8
index f19c60fd..99fc0677 100644
379fd8
--- a/libdnf/module/ModulePackageContainer.hpp
379fd8
+++ b/libdnf/module/ModulePackageContainer.hpp
379fd8
@@ -48,17 +48,15 @@ public:
379fd8
     enum class ModuleErrorType {
379fd8
         NO_ERROR = 0,
379fd8
         INFO,
379fd8
-        /// Error in module defaults detected during resolvement of module dependencies
379fd8
+        /// Error in module defaults detected during resovement of module dependencies
379fd8
         ERROR_IN_DEFAULTS,
379fd8
-        /// Error detected during resolvement of module dependencies
379fd8
+        /// Error detected during resovement of module dependencies
379fd8
         ERROR,
379fd8
-        /// Error detected during resolvement of module dependencies - Unexpected error!!!
379fd8
+        /// Error detected during resovement of module dependencies - Unexpected error!!!
379fd8
         CANNOT_RESOLVE_MODULES,
379fd8
         CANNOT_RESOLVE_MODULE_SPEC,
379fd8
         CANNOT_ENABLE_MULTIPLE_STREAMS,
379fd8
-        CANNOT_MODIFY_MULTIPLE_TIMES_MODULE_STATE,
379fd8
-        /// Problem with latest modules during resolvement of module dependencies
379fd8
-        ERROR_IN_LATEST
379fd8
+        CANNOT_MODIFY_MULTIPLE_TIMES_MODULE_STATE
379fd8
     };
379fd8
     
379fd8
     struct Exception : public std::runtime_error
379fd8
-- 
379fd8
2.31.1
379fd8