dcavalca / rpms / libdnf

Forked from rpms/libdnf 2 years ago
Clone
Blob Blame History Raw
From 293e10c58dadc023070f959b08999b6bc2efb1b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
Date: Sun, 25 Apr 2021 19:47:51 +0200
Subject: [PATCH 01/19] Revert "Improve performance for module query"

This reverts commit 38942d42b6980216e5d5e2e5798664cd08deb3ba.
---
 libdnf/module/ModulePackageContainer.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/libdnf/module/ModulePackageContainer.cpp b/libdnf/module/ModulePackageContainer.cpp
index 1d5070ca..edb7e9ec 100644
--- a/libdnf/module/ModulePackageContainer.cpp
+++ b/libdnf/module/ModulePackageContainer.cpp
@@ -775,11 +775,9 @@ ModulePackageContainer::query(std::string name, std::string stream, std::string
     Query query(pImpl->moduleSack, Query::ExcludeFlags::IGNORE_EXCLUDES);
     // platform modules are installed and not in modules std::Map.
     query.available();
-    if (!name.empty() || !stream.empty()) {
-        std::ostringstream ss;
-        ss << stringFormater(name) << ":" << stringFormater(stream);
-        query.addFilter(HY_PKG_DESCRIPTION, HY_GLOB, ss.str().c_str());
-    }
+    std::ostringstream ss;
+    ss << stringFormater(name) << ":" << stringFormater(stream);
+    query.addFilter(HY_PKG_DESCRIPTION, HY_GLOB, ss.str().c_str());
     if (!context.empty()) {
         query.addFilter(HY_PKG_SUMMARY, HY_GLOB, context.c_str());
     }
-- 
2.31.1