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

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