libdnf/SOURCES/0013-Revert-Add-an-alternative-constructor-for-ModulePack.patch
2021-09-09 20:04:42 +00:00

78 lines
3.2 KiB
Diff

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