From 85f459dbd0d41f32b90eb9b070dfbc5df9aa4d26 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 14 Jun 2016 14:25:55 +0200 Subject: [PATCH] Update to 0.6.22 Signed-off-by: Igor Gnatenko --- .gitignore | 1 + ...-code-so-that-it-keeps-all-providers.patch | 68 +++++++++++++++++++ libsolv.spec | 12 +++- sources | 2 +- 4 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 0001-Change-cleandeps-code-so-that-it-keeps-all-providers.patch diff --git a/.gitignore b/.gitignore index 2b9b670..74dc780 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /libsolv-0.6.19.tar.gz /libsolv-0.6.20.tar.gz /libsolv-0.6.21.tar.gz +/libsolv-0.6.22.tar.gz diff --git a/0001-Change-cleandeps-code-so-that-it-keeps-all-providers.patch b/0001-Change-cleandeps-code-so-that-it-keeps-all-providers.patch new file mode 100644 index 0000000..c9ba033 --- /dev/null +++ b/0001-Change-cleandeps-code-so-that-it-keeps-all-providers.patch @@ -0,0 +1,68 @@ +From 4e245d61daa731ebab0ac7e0f7bd87ba6c63f116 Mon Sep 17 00:00:00 2001 +From: Michael Schroeder +Date: Tue, 14 Jun 2016 13:15:40 +0200 +Subject: [PATCH] Change cleandeps code so that it keeps all providers + +It will report less unneeded packages, but it will also not +erase the wrong providers. +--- + src/rules.c | 19 ++++++------------- + 1 file changed, 6 insertions(+), 13 deletions(-) + +diff --git a/src/rules.c b/src/rules.c +index 32855e4..07c293a 100644 +--- a/src/rules.c ++++ b/src/rules.c +@@ -3869,10 +3869,7 @@ complex_cleandeps_addback(Pool *pool, Id ip, Id req, Map *im, Map *installedm, Q + { + if (!MAPTST(installedm, -p)) + break; +- continue; + } +- if (MAPTST(im, p)) +- break; + } + if (!p) + { +@@ -3880,6 +3877,8 @@ complex_cleandeps_addback(Pool *pool, Id ip, Id req, Map *im, Map *installedm, Q + { + if (p < 0) + continue; ++ if (MAPTST(im, p)) ++ continue; + if (!MAPTST(installedm, p)) + continue; + if (p == ip || MAPTST(userinstalled, p - pool->installed->start)) +@@ -4400,12 +4399,9 @@ solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded) + } + #endif + FOR_PROVIDES(p, pp, req) +- if (MAPTST(&im, p)) +- break; +- if (p) +- continue; +- FOR_PROVIDES(p, pp, req) + { ++ if (MAPTST(&im, p)) ++ continue; + if (MAPTST(&installedm, p)) + { + if (p == ip) +@@ -4434,12 +4430,9 @@ solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded) + } + #endif + FOR_PROVIDES(p, pp, req) +- if (MAPTST(&im, p)) +- break; +- if (p) +- continue; +- FOR_PROVIDES(p, pp, req) + { ++ if (MAPTST(&im, p)) ++ continue; + if (MAPTST(&installedm, p)) + { + if (p == ip) +-- +2.7.4 + diff --git a/libsolv.spec b/libsolv.spec index 398db37..f80820d 100644 --- a/libsolv.spec +++ b/libsolv.spec @@ -52,14 +52,17 @@ %{nil} Name: lib%{libname} -Version: 0.6.21 -Release: 3%{?dist} +Version: 0.6.22 +Release: 1%{?dist} Summary: Package dependency solver License: BSD URL: https://github.com/openSUSE/libsolv Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +# https://github.com/openSUSE/libsolv/commit/4e245d61daa731ebab0ac7e0f7bd87ba6c63f116 +Patch0001: 0001-Change-cleandeps-code-so-that-it-keeps-all-providers.patch + BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig(rpm) @@ -306,6 +309,11 @@ popd %endif %changelog +* Tue Jun 14 2016 Igor Gnatenko - 0.6.22-1 +- Update to 0.6.22 +- Backport patch which will help to not autoremove needed packages + (RHBZ #1227066, #1284349) + * Mon Jun 06 2016 Igor Gnatenko - 0.6.21-3 - Enable deb/arch support for non-rhel distros diff --git a/sources b/sources index 2a553a8..de9e845 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -540ff1dbd48f4b24a018641883500de6 libsolv-0.6.21.tar.gz +33e22fc89aa41e67dae917a8a587ae73 libsolv-0.6.22.tar.gz