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