diff --git a/SOURCES/0014-Mark-job-goalupgrade-with-sltr-as-targeted.patch b/SOURCES/0014-Mark-job-goalupgrade-with-sltr-as-targeted.patch new file mode 100644 index 0000000..7519454 --- /dev/null +++ b/SOURCES/0014-Mark-job-goalupgrade-with-sltr-as-targeted.patch @@ -0,0 +1,46 @@ +From a9e281087d075f798ac64dad657d34816d533d2a Mon Sep 17 00:00:00 2001 +From: Jaroslav Mracek +Date: Tue, 3 Sep 2019 11:01:23 +0200 +Subject: [PATCH] Mark job goal.upgrade with sltr as targeted + +It allows to keep installed packages in upgrade set. + +It also prevents from reinstalling of modified packages with same NEVRA. +--- + libdnf/goal/Goal.cpp | 2 +- + libdnf/goal/Goal.hpp | 6 ++++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/libdnf/goal/Goal.cpp b/libdnf/goal/Goal.cpp +index b69be19..a38cbb4 100644 +--- a/libdnf/goal/Goal.cpp ++++ b/libdnf/goal/Goal.cpp +@@ -767,7 +767,7 @@ void + Goal::upgrade(HySelector sltr) + { + pImpl->actions = static_cast(pImpl->actions | DNF_UPGRADE); +- sltrToJob(sltr, &pImpl->staging, SOLVER_UPDATE); ++ sltrToJob(sltr, &pImpl->staging, SOLVER_UPDATE|SOLVER_TARGETED); + } + + void +diff --git a/libdnf/goal/Goal.hpp b/libdnf/goal/Goal.hpp +index f33dfa2..d701317 100644 +--- a/libdnf/goal/Goal.hpp ++++ b/libdnf/goal/Goal.hpp +@@ -86,8 +86,10 @@ public: + /** + * @brief If selector ill formed, it rises std::runtime_error() + * +- * @param sltr p_sltr: It should contain only upgrades with obsoletes otherwise it can try to +- * reinstall installonly packages. ++ * @param sltr p_sltr: It contains upgrade-to packages and obsoletes. The presence of installed ++ * packages prevents reinstalling packages with the same NEVRA but changed contant. To honor repo ++ * priority all relevant packages must be present. To upgrade package foo from priority repo, all ++ * installed and available packages of the foo must be in selector plus obsoletes of foo. + */ + void upgrade(HySelector sltr); + void userInstalled(DnfPackage *pkg); +-- +libgit2 0.28.2 + diff --git a/SOURCES/0015-Apply-targeted-upgrade-only-for-selector-with-packages.patch b/SOURCES/0015-Apply-targeted-upgrade-only-for-selector-with-packages.patch new file mode 100644 index 0000000..dd92606 --- /dev/null +++ b/SOURCES/0015-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/SOURCES/6c4f7462b3004e39e82c4ec186175ea4a56035b4.patch b/SOURCES/6c4f7462b3004e39e82c4ec186175ea4a56035b4.patch deleted file mode 100644 index cd4efbe..0000000 --- a/SOURCES/6c4f7462b3004e39e82c4ec186175ea4a56035b4.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6c4f7462b3004e39e82c4ec186175ea4a56035b4 Mon Sep 17 00:00:00 2001 -From: Jaroslav Rohel -Date: Fri, 9 Aug 2019 09:54:49 +0200 -Subject: [PATCH] hy_detect_arch(): detect crypto only on arm version >= 8 - -Before patch: -It detected armv7 with crypto extension on some "qemu-arm" -configurations. New architecture string "armv7hcnl" was generated. - -After patch: -It detect crypto extension only if arm version >= 8. - -https://bugzilla.redhat.com/show_bug.cgi?id=1691430 - -Closes: #771 -Approved by: dmach ---- - libdnf/hy-util.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/libdnf/hy-util.cpp b/libdnf/hy-util.cpp -index 61838cc36..f6de87d33 100644 ---- a/libdnf/hy-util.cpp -+++ b/libdnf/hy-util.cpp -@@ -118,7 +118,8 @@ hy_detect_arch(char **arch) - modifier++; - if (getauxval(AT_HWCAP) & HWCAP_ARM_VFP) - *modifier++ = 'h'; -- if (getauxval(AT_HWCAP2) & HWCAP2_AES) -+ // arm version >= 8 can have crypto extension -+ if ((atoi(un.machine+4) >= 8) && (getauxval(AT_HWCAP2) & HWCAP2_AES)) - *modifier++ = 'c'; - if (getauxval(AT_HWCAP) & HWCAP_ARM_NEON) - *modifier++ = 'n'; diff --git a/SPECS/libdnf.spec b/SPECS/libdnf.spec index d6ae073..f1d8ff8 100644 --- a/SPECS/libdnf.spec +++ b/SPECS/libdnf.spec @@ -1,7 +1,7 @@ %global libsolv_version 0.7.4-1 %global libmodulemd_version 1.6.1 %global librepo_version 1.10.0 -%global dnf_conflict 4.2.5 +%global dnf_conflict 4.2.7-7 %global swig_version 3.0.12 %bcond_with valgrind @@ -38,7 +38,7 @@ Name: libdnf Version: 0.35.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Library providing simplified C and Python API to libsolv License: LGPLv2+ URL: https://github.com/rpm-software-management/libdnf @@ -57,8 +57,8 @@ Patch10: 0010-Use-copy-delete-fallback-if-moving-of-directory-fail.patch Patch11: 0011-Expose-dnf_copy_file-and-dnf_copy_recursive-in-priva.patch Patch12: 0012-Add-dnf_remove_recursive_v2-that-support-unlink-of-f.patch Patch13: 0013-Fix-dnf_move_recursive-for-file-in-fallback-mode.patch - -Patch9999: 6c4f7462b3004e39e82c4ec186175ea4a56035b4.patch +Patch14: 0014-Mark-job-goalupgrade-with-sltr-as-targeted.patch +Patch15: 0015-Apply-targeted-upgrade-only-for-selector-with-packages.patch BuildRequires: cmake BuildRequires: gcc @@ -271,6 +271,9 @@ popd %endif %changelog +* Wed Oct 16 2019 Pavla Kratochvilova - 0.35.1-9 +- Prevent reinstalling modified packages with same NEVRA (RhBug:1728252,1644241,1760825) + * Fri Sep 06 2019 Marek Blaha - 0.35.1-8 - Enhanced fix of moving directories in minimal container (RhBug:1700341)