From 63b2c4b2a6a3dd845170ca97358cfa5b0a03db21 Mon Sep 17 00:00:00 2001 From: Jaroslav Mracek Date: Sep 11 2019 15:21:58 +0000 Subject: Additional patch to fix reinstalling pkgs with a different buildtime --- diff --git a/0005-Apply-targeted-upgrade-only-for-selector-with-packages.patch b/0005-Apply-targeted-upgrade-only-for-selector-with-packages.patch new file mode 100644 index 0000000..dd92606 --- /dev/null +++ b/0005-Apply-targeted-upgrade-only-for-selector-with-packages.patch @@ -0,0 +1,34 @@ +From c235dae84d1b45911f6de1c5d31fedf4856c0d42 Mon Sep 17 00:00:00 2001 +From: Jaroslav Mracek +Date: Wed, 11 Sep 2019 13:26:43 +0200 +Subject: [PATCH] Apply targeted upgrade only for selector with packages + +It resolves problem when selector with name filter is used. Then +targeted transaction ignores obsoletes. + +Closes: #793 +Approved by: jrohel +--- + libdnf/goal/Goal.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/libdnf/goal/Goal.cpp b/libdnf/goal/Goal.cpp +index a38cbb4..88e7b8c 100644 +--- a/libdnf/goal/Goal.cpp ++++ b/libdnf/goal/Goal.cpp +@@ -767,7 +767,11 @@ void + Goal::upgrade(HySelector sltr) + { + pImpl->actions = static_cast(pImpl->actions | DNF_UPGRADE); +- sltrToJob(sltr, &pImpl->staging, SOLVER_UPDATE|SOLVER_TARGETED); ++ auto flags = SOLVER_UPDATE; ++ if (sltr->getPkgs()) { ++ flags |= SOLVER_TARGETED; ++ } ++ sltrToJob(sltr, &pImpl->staging, flags); + } + + void +-- +libgit2 0.28.2 + diff --git a/libdnf.spec b/libdnf.spec index 630b41f..353b403 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -38,7 +38,7 @@ Name: libdnf Version: 0.35.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Library providing simplified C and Python API to libsolv License: LGPLv2+ URL: https://github.com/rpm-software-management/libdnf @@ -48,6 +48,7 @@ Patch0001: 0001-Revert-9309e92332241ff1113433057c969cebf127734e.patch # until the infrastructure is ready Patch0002: 0002-Revert-consequences-of-Fail-Safe-mechanism.patch Patch0003: 0004-Mark-job-goalupgrade-with-sltr-as-targeted.patch +Patch0004: 0005-Apply-targeted-upgrade-only-for-selector-with-packages.patch BuildRequires: cmake BuildRequires: gcc @@ -270,6 +271,9 @@ popd %endif %changelog +* Wed Sep 11 2019 Jaroslav Mracek - 0.35.3-4 +- Backport patch to fix reinstalling packages with a different buildtime - part II + * Thu Sep 10 2019 Jaroslav Mracek - 0.35.3-3 - Backport patch to fix reinstalling packages with a different buildtime