|
|
aea1e4 |
From 50aa9f29dbfc1523a3b6aea41c6caa37f30c1bf0 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 15/19] Revert "Change usage of context and version in modular
|
|
|
aea1e4 |
solver"
|
|
|
aea1e4 |
|
|
|
aea1e4 |
This reverts commit 1f4c5b2a37ec333b23a12b882b046fac858155aa.
|
|
|
aea1e4 |
---
|
|
|
aea1e4 |
libdnf/module/ModulePackage.cpp | 28 ++++++++++++++--------------
|
|
|
aea1e4 |
1 file changed, 14 insertions(+), 14 deletions(-)
|
|
|
aea1e4 |
|
|
|
aea1e4 |
diff --git a/libdnf/module/ModulePackage.cpp b/libdnf/module/ModulePackage.cpp
|
|
|
aea1e4 |
index 8126bcaa..eea4a8b5 100644
|
|
|
aea1e4 |
--- a/libdnf/module/ModulePackage.cpp
|
|
|
aea1e4 |
+++ b/libdnf/module/ModulePackage.cpp
|
|
|
aea1e4 |
@@ -43,25 +43,19 @@ 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, std::string & name,
|
|
|
aea1e4 |
- std::string & stream, std::string & version, std::string & context, const char * arch)
|
|
|
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 |
- ss << name << ":" << stream << ":" << context;
|
|
|
aea1e4 |
+ // create solvable with:
|
|
|
aea1e4 |
+ // Name: $name:$stream:$version:$context
|
|
|
aea1e4 |
+ // Version: 0
|
|
|
aea1e4 |
+ // Arch: $arch
|
|
|
aea1e4 |
+ ss << name << ":" << stream << ":" << version << ":" << context;
|
|
|
aea1e4 |
solvable_set_str(solvable, SOLVABLE_NAME, ss.str().c_str());
|
|
|
aea1e4 |
- solvable_set_str(solvable, SOLVABLE_EVR, version.c_str());
|
|
|
aea1e4 |
+ solvable_set_str(solvable, SOLVABLE_EVR, "0");
|
|
|
aea1e4 |
// TODO Test can be remove when modules will be always with arch
|
|
|
aea1e4 |
solvable_set_str(solvable, SOLVABLE_ARCH, arch ? arch : "noarch");
|
|
|
aea1e4 |
-
|
|
|
aea1e4 |
// create Provide: module($name)
|
|
|
aea1e4 |
ss.str(std::string());
|
|
|
aea1e4 |
ss << "module(" << name << ")";
|
|
|
aea1e4 |
@@ -73,6 +67,12 @@ namespace libdnf {
|
|
|
aea1e4 |
ss << "module(" << name << ":" << stream << ")";
|
|
|
aea1e4 |
depId = pool_str2id(pool, ss.str().c_str(), 1);
|
|
|
aea1e4 |
solvable_add_deparray(solvable, SOLVABLE_PROVIDES, depId, -1);
|
|
|
aea1e4 |
+
|
|
|
aea1e4 |
+ // create Provide: module($name:$stream:$version)
|
|
|
aea1e4 |
+ ss.str(std::string());
|
|
|
aea1e4 |
+ ss << "module(" << name << ":" << stream << ":" << version << ")";
|
|
|
aea1e4 |
+ depId = pool_str2id(pool, ss.str().c_str(), 1);
|
|
|
aea1e4 |
+ solvable_add_deparray(solvable, SOLVABLE_PROVIDES, depId, -1);
|
|
|
aea1e4 |
}
|
|
|
aea1e4 |
|
|
|
aea1e4 |
|
|
|
aea1e4 |
--
|
|
|
aea1e4 |
2.31.1
|
|
|
aea1e4 |
|