Blame SOURCES/0013-Revert-Add-an-alternative-constructor-for-ModulePack.patch

379fd8
From b1ed6e111ce05f8f1fe7b35afc1a3ef6f0731f7c 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 13/19] Revert "Add an alternative constructor for
379fd8
 ModulePackage"
379fd8
379fd8
This reverts commit d05bb263de6822c13ac4bd5cca3628318f5c7ce7.
379fd8
---
379fd8
 libdnf/module/ModulePackage.cpp | 24 ++++++++++++------------
379fd8
 libdnf/module/ModulePackage.hpp |  2 +-
379fd8
 2 files changed, 13 insertions(+), 13 deletions(-)
379fd8
379fd8
diff --git a/libdnf/module/ModulePackage.cpp b/libdnf/module/ModulePackage.cpp
379fd8
index 63ee1656..8126bcaa 100644
379fd8
--- a/libdnf/module/ModulePackage.cpp
379fd8
+++ b/libdnf/module/ModulePackage.cpp
379fd8
@@ -43,16 +43,16 @@ extern "C" {
379fd8
 
379fd8
 namespace libdnf {
379fd8
 
379fd8
-/**
379fd8
- * @brief create solvable with:
379fd8
- *   Name: $name:$stream:$context
379fd8
- *   Version: $version
379fd8
- *   Arch: $arch (If arch is not defined, set "noarch")
379fd8
- *   Provides: module($name)
379fd8
- *   Provides: module($name:$stream)
379fd8
- */
379fd8
-static void setSovable(Pool * pool, Solvable * solvable, const std::string & name,
379fd8
-    const std::string & stream, const std::string & version, const std::string & context, const char * arch)
379fd8
+    /**
379fd8
+     * @brief create solvable with:
379fd8
+     *   Name: $name:$stream:$context
379fd8
+     *   Version: $version
379fd8
+     *   Arch: $arch (If arch is not defined, set "noarch")
379fd8
+     *   Provides: module($name)
379fd8
+     *   Provides: module($name:$stream)
379fd8
+     */
379fd8
+    static void setSovable(Pool * pool, Solvable *solvable, std::string & name,
379fd8
+    std::string & stream, std::string & version, std::string & context, const char * arch)
379fd8
 {
379fd8
     std::ostringstream ss;
379fd8
     //   Name: $name:$stream:$context
379fd8
@@ -86,7 +86,7 @@ static std::pair<std::string, std::string> parsePlatform(const std::string & pla
379fd8
 }
379fd8
 
379fd8
 ModulePackage::ModulePackage(DnfSack * moduleSack, LibsolvRepo * repo,
379fd8
-    ModulemdModuleStream * mdStream, const std::string & repoID, const std::string & context)
379fd8
+    ModulemdModuleStream * mdStream, const std::string & repoID)
379fd8
         : mdStream(mdStream)
379fd8
         , moduleSack(moduleSack)
379fd8
         , repoID(repoID)
379fd8
@@ -98,7 +98,7 @@ ModulePackage::ModulePackage(DnfSack * moduleSack, LibsolvRepo * repo,
379fd8
     id = repo_add_solvable(repo);
379fd8
     Solvable *solvable = pool_id2solvable(pool, id);
379fd8
 
379fd8
-    setSovable(pool, solvable, getName(), getStream(), getVersion(), context.empty() ? getContext() : context, getArchCStr());
379fd8
+    setSovable(pool, solvable, getName(), getStream(), getVersion(), getContext(), getArchCStr());
379fd8
     createDependencies(solvable);
379fd8
     HyRepo hyRepo = static_cast<HyRepo>(repo->appdata);
379fd8
     libdnf::repoGetImpl(hyRepo)->needs_internalizing = 1;
379fd8
diff --git a/libdnf/module/ModulePackage.hpp b/libdnf/module/ModulePackage.hpp
379fd8
index 145c6d63..47cc995c 100644
379fd8
--- a/libdnf/module/ModulePackage.hpp
379fd8
+++ b/libdnf/module/ModulePackage.hpp
379fd8
@@ -95,7 +95,7 @@ private:
379fd8
     friend struct ModuleMetadata;
379fd8
 
379fd8
     ModulePackage(DnfSack * moduleSack, LibsolvRepo * repo,
379fd8
-        ModulemdModuleStream * mdStream, const std::string & repoID, const std::string & context = {});
379fd8
+        ModulemdModuleStream * mdStream, const std::string & repoID);
379fd8
 
379fd8
     ModulePackage(const ModulePackage & mpkg);
379fd8
     ModulePackage & operator=(const ModulePackage & mpkg);
379fd8
-- 
379fd8
2.31.1
379fd8