From 5f0c9a9ee57c39102c9f95b5515cfd849e88464e Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Thu, 23 Dec 2021 16:30:20 +0800 Subject: [PATCH] module: fix platform compatibility with centos Signed-off-by: Liwei Ge Signed-off-by: yunqi.zwt --- 1000-anolis-fix-platform-compatibility.path | 7 ++++++- libdnf.spec | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/1000-anolis-fix-platform-compatibility.path b/1000-anolis-fix-platform-compatibility.path index 977f72e..b470693 100644 --- a/1000-anolis-fix-platform-compatibility.path +++ b/1000-anolis-fix-platform-compatibility.path @@ -1,7 +1,7 @@ diff -Nur libdnf-0.55.0/libdnf/module/ModulePackage.cpp libdnf-0.55.0.new/libdnf/module/ModulePackage.cpp --- libdnf-0.55.0/libdnf/module/ModulePackage.cpp 2020-11-09 22:42:13.000000000 +0800 +++ libdnf-0.55.0.new/libdnf/module/ModulePackage.cpp 2021-07-08 16:40:15.635247194 +0800 -@@ -580,6 +580,11 @@ +@@ -580,6 +580,16 @@ Id id = repo_add_solvable(repo); Solvable *solvable = pool_id2solvable(pool, id); setSovable(pool, solvable, name, stream, version, context, "noarch"); @@ -9,6 +9,11 @@ diff -Nur libdnf-0.55.0/libdnf/module/ModulePackage.cpp libdnf-0.55.0.new/libdnf + { + std::string compatible_stream = "el8"; + setSovable(pool, solvable, name, compatible_stream, version, context, "noarch"); ++ } ++ if (name == "platform" and stream == "el8") ++ { ++ std::string compatible_stream = "an8"; ++ setSovable(pool, solvable, name, compatible_stream, version, context, "noarch"); + } repoImpl->needs_internalizing = 1; dnf_sack_set_provides_not_ready(moduleSack); diff --git a/libdnf.spec b/libdnf.spec index d48ed0a..9ace4bc 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 %global libsolv_version 0.7.17 %global libmodulemd_version 2.11.2-2 %global librepo_version 1.13.1 @@ -331,6 +331,9 @@ popd %endif %changelog +* Thu Dec 23 2021 Liwei Ge - 0.63.0-3.0.2 +- Fix platform compatibility with centos + * Wed Dec 15 2021 zhangbinchen - 0.63.0-3.0.1 - cherry-pick [8469287] - Disable rhsm support in Anolis -- Gitee