diff --git a/SOURCES/0006-Set-default-to-skip_if_unavailablefalse-RhBug1679509.patch b/SOURCES/0006-Set-default-to-skip_if_unavailablefalse-RhBug1679509.patch new file mode 100644 index 0000000..67266fb --- /dev/null +++ b/SOURCES/0006-Set-default-to-skip_if_unavailablefalse-RhBug1679509.patch @@ -0,0 +1,39 @@ +From d1dfe281c538a03adc4193bb9e67f5de7a2365c4 Mon Sep 17 00:00:00 2001 +From: Jaroslav Mracek +Date: Fri, 15 Mar 2019 15:29:13 +0100 +Subject: [PATCH] Set default to skip_if_unavailable=false (RhBug:1679509) + +--- + libdnf/conf/ConfigRepo.cpp | 2 +- + libdnf/dnf-repo.cpp | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/libdnf/conf/ConfigRepo.cpp b/libdnf/conf/ConfigRepo.cpp +index fd180d2..754401e 100644 +--- a/libdnf/conf/ConfigRepo.cpp ++++ b/libdnf/conf/ConfigRepo.cpp +@@ -162,7 +162,7 @@ class ConfigRepo::Impl { + OptionChild > deltarpm_percentage{masterConfig.deltarpm_percentage()}; + OptionBinding deltaRpmPercentageBinding{owner, deltarpm_percentage, "deltarpm_percentage"}; + +- OptionBool skip_if_unavailable{true}; ++ OptionBool skip_if_unavailable{false}; + OptionBinding skipIfUnavailableBinding{owner, skip_if_unavailable, "skip_if_unavailable"}; + + OptionString enabled_metadata{""}; +diff --git a/libdnf/dnf-repo.cpp b/libdnf/dnf-repo.cpp +index 2685337..e226081 100644 +--- a/libdnf/dnf-repo.cpp ++++ b/libdnf/dnf-repo.cpp +@@ -966,6 +966,8 @@ dnf_repo_set_keyfile_data(DnfRepo *repo, GError **error) + priv->required = FALSE; + else + priv->required = TRUE; ++ } else { ++ priv->required = TRUE; + } + + /* cost is optional */ +-- +libgit2 0.27.7 + diff --git a/SOURCES/0007-Add-configuration-option-skip_if_unavailable-RhBug1689931.patch b/SOURCES/0007-Add-configuration-option-skip_if_unavailable-RhBug1689931.patch new file mode 100644 index 0000000..dad5124 --- /dev/null +++ b/SOURCES/0007-Add-configuration-option-skip_if_unavailable-RhBug1689931.patch @@ -0,0 +1,83 @@ +From d4917c293fda8f533ef57130c1a46215901f92a4 Mon Sep 17 00:00:00 2001 +From: Jaroslav Mracek +Date: Wed, 3 Apr 2019 12:25:17 +0200 +Subject: [PATCH] Add configuration option skip_if_unavailable (RhBug:1689931) + +--- + libdnf/conf/ConfigMain.cpp | 4 ++++ + libdnf/conf/ConfigMain.hpp | 1 + + libdnf/conf/ConfigRepo.cpp | 4 ++-- + libdnf/conf/ConfigRepo.hpp | 2 +- + 4 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/libdnf/conf/ConfigMain.cpp b/libdnf/conf/ConfigMain.cpp +index aff6b87..9016e6e 100644 +--- a/libdnf/conf/ConfigMain.cpp ++++ b/libdnf/conf/ConfigMain.cpp +@@ -530,6 +530,9 @@ class ConfigMain::Impl { + + OptionNumber deltarpm_percentage{75}; + OptionBinding deltaRpmPercentageBinding{owner, deltarpm_percentage, "deltarpm_percentage"}; ++ ++ OptionBool skip_if_unavailable{false}; ++ OptionBinding skip_if_unavailableBinding{owner, skip_if_unavailable, "skip_if_unavailable"}; + }; + + ConfigMain::ConfigMain() { pImpl = std::unique_ptr(new Impl(*this)); } +@@ -631,5 +634,6 @@ OptionString & ConfigMain::sslclientcert() { return pImpl->sslclientcert; } + OptionString & ConfigMain::sslclientkey() { return pImpl->sslclientkey; } + OptionBool & ConfigMain::deltarpm() { return pImpl->deltarpm; } + OptionNumber & ConfigMain::deltarpm_percentage() { return pImpl->deltarpm_percentage; } ++OptionBool & ConfigMain::skip_if_unavailable() { return pImpl->skip_if_unavailable; } + + } +diff --git a/libdnf/conf/ConfigMain.hpp b/libdnf/conf/ConfigMain.hpp +index 2aef32a..6423644 100644 +--- a/libdnf/conf/ConfigMain.hpp ++++ b/libdnf/conf/ConfigMain.hpp +@@ -147,6 +147,7 @@ public: + OptionString & sslclientkey(); + OptionBool & deltarpm(); + OptionNumber & deltarpm_percentage(); ++ OptionBool & skip_if_unavailable(); + + private: + class Impl; +diff --git a/libdnf/conf/ConfigRepo.cpp b/libdnf/conf/ConfigRepo.cpp +index 754401e..17f8817 100644 +--- a/libdnf/conf/ConfigRepo.cpp ++++ b/libdnf/conf/ConfigRepo.cpp +@@ -162,7 +162,7 @@ class ConfigRepo::Impl { + OptionChild > deltarpm_percentage{masterConfig.deltarpm_percentage()}; + OptionBinding deltaRpmPercentageBinding{owner, deltarpm_percentage, "deltarpm_percentage"}; + +- OptionBool skip_if_unavailable{false}; ++ OptionChild skip_if_unavailable{masterConfig.skip_if_unavailable()}; + OptionBinding skipIfUnavailableBinding{owner, skip_if_unavailable, "skip_if_unavailable"}; + + OptionString enabled_metadata{""}; +@@ -216,7 +216,7 @@ OptionChild & ConfigRepo::sslclientcert() { return pImpl->sslclien + OptionChild & ConfigRepo::sslclientkey() { return pImpl->sslclientkey; } + OptionChild & ConfigRepo::deltarpm() { return pImpl->deltarpm; } + OptionChild > & ConfigRepo::deltarpm_percentage() { return pImpl->deltarpm_percentage; } +-OptionBool & ConfigRepo::skip_if_unavailable() { return pImpl->skip_if_unavailable; } ++OptionChild & ConfigRepo::skip_if_unavailable() { return pImpl->skip_if_unavailable; } + OptionString & ConfigRepo::enabled_metadata() { return pImpl->enabled_metadata; } + OptionEnum & ConfigRepo::failovermethod() { return pImpl->failovermethod; } + +diff --git a/libdnf/conf/ConfigRepo.hpp b/libdnf/conf/ConfigRepo.hpp +index 781a40f..0f0eda3 100644 +--- a/libdnf/conf/ConfigRepo.hpp ++++ b/libdnf/conf/ConfigRepo.hpp +@@ -83,7 +83,7 @@ public: + OptionChild & sslclientkey(); + OptionChild & deltarpm(); + OptionChild > & deltarpm_percentage(); +- OptionBool & skip_if_unavailable(); ++ OptionChild & skip_if_unavailable(); + // option recognized by other tools, e.g. gnome-software, but unused in dnf + OptionString & enabled_metadata(); + // yum compatibility options +-- +libgit2 0.27.7 + diff --git a/SPECS/libdnf.spec b/SPECS/libdnf.spec index 8b855fd..4d38999 100644 --- a/SPECS/libdnf.spec +++ b/SPECS/libdnf.spec @@ -31,7 +31,7 @@ Name: libdnf Version: 0.22.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library providing simplified C and Python API to libsolv License: LGPLv2+ URL: https://github.com/rpm-software-management/libdnf @@ -41,6 +41,8 @@ Patch0002: 0002-Add-support-for-Module-advisories.patch Patch0003: 0003-Add-setter-of-ModuleContainer-for-PySack.patch Patch0004: 0004-Add-testing-if-advisory-is-applicable-for-query-and-package.patch Patch0005: 0005-Exclude-module-pkgs-that-have-conflict.patch +Patch0006: 0006-Set-default-to-skip_if_unavailablefalse-RhBug1679509.patch +Patch0007: 0007-Add-configuration-option-skip_if_unavailable-RhBug1689931.patch BuildRequires: cmake BuildRequires: gcc @@ -250,6 +252,9 @@ popd %endif %changelog +* Wed Apr 03 2019 Jaroslav Mracek - 0.22.5-5 +- Backport patches to set default to skip_if_unavailable to false (RhBug:1692452) + * Tue Feb 12 2019 Jaroslav Mracek - 0.22.5-4 - Backport patch to exclude module pkgs that have conflict (RhBug:1670496)