richardphibel / rpms / libdnf

Forked from rpms/libdnf 2 years ago
Clone

Blame SOURCES/0001-Revert-Improve-performance-for-module-query.patch

aea1e4
From 293e10c58dadc023070f959b08999b6bc2efb1b2 Mon Sep 17 00:00:00 2001
aea1e4
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
aea1e4
Date: Sun, 25 Apr 2021 19:47:51 +0200
aea1e4
Subject: [PATCH 01/19] Revert "Improve performance for module query"
aea1e4
aea1e4
This reverts commit 38942d42b6980216e5d5e2e5798664cd08deb3ba.
aea1e4
---
aea1e4
 libdnf/module/ModulePackageContainer.cpp | 8 +++-----
aea1e4
 1 file changed, 3 insertions(+), 5 deletions(-)
aea1e4
aea1e4
diff --git a/libdnf/module/ModulePackageContainer.cpp b/libdnf/module/ModulePackageContainer.cpp
aea1e4
index 1d5070ca..edb7e9ec 100644
aea1e4
--- a/libdnf/module/ModulePackageContainer.cpp
aea1e4
+++ b/libdnf/module/ModulePackageContainer.cpp
aea1e4
@@ -775,11 +775,9 @@ ModulePackageContainer::query(std::string name, std::string stream, std::string
aea1e4
     Query query(pImpl->moduleSack, Query::ExcludeFlags::IGNORE_EXCLUDES);
aea1e4
     // platform modules are installed and not in modules std::Map.
aea1e4
     query.available();
aea1e4
-    if (!name.empty() || !stream.empty()) {
aea1e4
-        std::ostringstream ss;
aea1e4
-        ss << stringFormater(name) << ":" << stringFormater(stream);
aea1e4
-        query.addFilter(HY_PKG_DESCRIPTION, HY_GLOB, ss.str().c_str());
aea1e4
-    }
aea1e4
+    std::ostringstream ss;
aea1e4
+    ss << stringFormater(name) << ":" << stringFormater(stream);
aea1e4
+    query.addFilter(HY_PKG_DESCRIPTION, HY_GLOB, ss.str().c_str());
aea1e4
     if (!context.empty()) {
aea1e4
         query.addFilter(HY_PKG_SUMMARY, HY_GLOB, context.c_str());
aea1e4
     }
aea1e4
-- 
aea1e4
2.31.1
aea1e4