richardphibel / rpms / libdnf

Forked from rpms/libdnf 2 years ago
Clone
2e24b4
From e43ef244e78d8563eb3cb7ff6a6074946f60c877 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 09/19] Revert "Change mechanism of module conflicts"
2e24b4
2e24b4
This reverts commit 49600ba05b474bc29651aa122a9116b5ada69f4d.
2e24b4
---
2e24b4
 libdnf/dnf-sack.cpp                      | 1 +
2e24b4
 libdnf/module/ModulePackage.cpp          | 2 --
2e24b4
 libdnf/module/ModulePackage.hpp          | 1 -
2e24b4
 libdnf/module/ModulePackageContainer.cpp | 1 -
2e24b4
 libdnf/module/ModulePackageContainer.hpp | 1 -
2e24b4
 5 files changed, 1 insertion(+), 5 deletions(-)
2e24b4
2e24b4
diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp
2e24b4
index b5c7edc0..b9baeaef 100644
2e24b4
--- a/libdnf/dnf-sack.cpp
2e24b4
+++ b/libdnf/dnf-sack.cpp
2e24b4
@@ -2297,6 +2297,7 @@ void readModuleMetadataFromRepo(DnfSack * sack, libdnf::ModulePackageContainer *
2e24b4
     modulePackages->add(sack);
2e24b4
     modulePackages->loadFailSafeData();
2e24b4
     if (!modulePackages->empty()) {
2e24b4
+        modulePackages->createConflictsBetweenStreams();
2e24b4
         // TODO remove hard-coded path
2e24b4
         try {
2e24b4
             std::vector<std::string> paths{"/etc/os-release", "/usr/lib/os-release"};
2e24b4
diff --git a/libdnf/module/ModulePackage.cpp b/libdnf/module/ModulePackage.cpp
2e24b4
index d0017877..d644eca6 100644
2e24b4
--- a/libdnf/module/ModulePackage.cpp
2e24b4
+++ b/libdnf/module/ModulePackage.cpp
2e24b4
@@ -75,8 +75,6 @@ static void setSovable(Pool * pool, Solvable * solvable, const std::string & nam
2e24b4
     ss << "module(" << name << ")";
2e24b4
     auto depId = pool_str2id(pool, ss.str().c_str(), 1);
2e24b4
     solvable_add_deparray(solvable, SOLVABLE_PROVIDES, depId, -1);
2e24b4
-    // create Conflicts: module($name)
2e24b4
-    solvable_add_deparray(solvable, SOLVABLE_CONFLICTS, depId, 0);
2e24b4
 
2e24b4
     // create Provide: module($name:$stream)
2e24b4
     ss.str(std::string());
2e24b4
diff --git a/libdnf/module/ModulePackage.hpp b/libdnf/module/ModulePackage.hpp
2e24b4
index b618df58..145c6d63 100644
2e24b4
--- a/libdnf/module/ModulePackage.hpp
2e24b4
+++ b/libdnf/module/ModulePackage.hpp
2e24b4
@@ -71,7 +71,6 @@ public:
2e24b4
 
2e24b4
     std::vector<ModuleDependencies> getModuleDependencies() const;
2e24b4
 
2e24b4
-    ///DEPRECATED
2e24b4
     void addStreamConflict(const ModulePackage * package);
2e24b4
 
2e24b4
     Id getId() const { return id; };
2e24b4
diff --git a/libdnf/module/ModulePackageContainer.cpp b/libdnf/module/ModulePackageContainer.cpp
2e24b4
index 97c84c01..893b839a 100644
2e24b4
--- a/libdnf/module/ModulePackageContainer.cpp
2e24b4
+++ b/libdnf/module/ModulePackageContainer.cpp
2e24b4
@@ -204,7 +204,6 @@ private:
2e24b4
     /// solvable.arch = <moduleArch>
2e24b4
     /// solvable.summary = <moduleContext>
2e24b4
     /// solvable.description = <moduleName>:<moduleStream>
2e24b4
-    /// solvable.conflicts = module(<moduleName>)
2e24b4
     DnfSack * moduleSack;
2e24b4
     std::unique_ptr<PackageSet> activatedModules;
2e24b4
     std::string installRoot;
2e24b4
diff --git a/libdnf/module/ModulePackageContainer.hpp b/libdnf/module/ModulePackageContainer.hpp
2e24b4
index 99fc0677..c1001fce 100644
2e24b4
--- a/libdnf/module/ModulePackageContainer.hpp
2e24b4
+++ b/libdnf/module/ModulePackageContainer.hpp
2e24b4
@@ -115,7 +115,6 @@ public:
2e24b4
     Id addPlatformPackage(const std::string &osReleasePath, const char *  platformModule);
2e24b4
     Id addPlatformPackage(DnfSack * sack,
2e24b4
         const std::vector<std::string> & osReleasePath, const char * platformModule);
2e24b4
-    /// DEPRECATED
2e24b4
     void createConflictsBetweenStreams();
2e24b4
 
2e24b4
     /**
2e24b4
-- 
2e24b4
2.31.1
2e24b4