From 10bb86621eb56163dab6ab5d2750abdd3945bc8f Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 27 Jul 2016 16:28:08 +0200 Subject: [PATCH] Update to 0.6.23 Signed-off-by: Igor Gnatenko --- .gitignore | 1 + ...-at-the-arch-when-sorting-obsoleters.patch | 31 --------- ...-code-so-that-it-keeps-all-providers.patch | 68 ------------------- ...to-account-when-calculating-unneeded.patch | 53 --------------- ...mit-so-that-self-providing-requires-.patch | 50 -------------- libsolv.spec | 19 ++---- sources | 2 +- 7 files changed, 7 insertions(+), 217 deletions(-) delete mode 100644 0001-Also-look-at-the-arch-when-sorting-obsoleters.patch delete mode 100644 0001-Change-cleandeps-code-so-that-it-keeps-all-providers.patch delete mode 100644 0001-Take-lockstep-into-account-when-calculating-unneeded.patch delete mode 100644 0002-Improve-last-commit-so-that-self-providing-requires-.patch diff --git a/.gitignore b/.gitignore index 74dc780..4c0e476 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /libsolv-0.6.20.tar.gz /libsolv-0.6.21.tar.gz /libsolv-0.6.22.tar.gz +/libsolv-0.6.23.tar.gz diff --git a/0001-Also-look-at-the-arch-when-sorting-obsoleters.patch b/0001-Also-look-at-the-arch-when-sorting-obsoleters.patch deleted file mode 100644 index e7118e4..0000000 --- a/0001-Also-look-at-the-arch-when-sorting-obsoleters.patch +++ /dev/null @@ -1,31 +0,0 @@ -From cfd34d63f0884b32603cdbf91c3dc952b7b35948 Mon Sep 17 00:00:00 2001 -From: Michael Schroeder -Date: Tue, 12 Jul 2016 14:14:20 +0200 -Subject: [PATCH] Also look at the arch when sorting obsoleters - ---- - src/transaction.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/src/transaction.c b/src/transaction.c -index ffe1ec2..9a32966 100644 ---- a/src/transaction.c -+++ b/src/transaction.c -@@ -56,6 +56,14 @@ obsq_sortcmp(const void *ap, const void *bp, void *dp) - r = pool_evrcmp(pool, oas->evr, obs->evr, EVRCMP_COMPARE); - if (r) - return -r; /* highest version first */ -+ if (oas->arch != obs->arch) -+ { -+ /* bring same arch to front */ -+ if (oas->arch == s->arch) -+ return -1; -+ if (obs->arch == s->arch) -+ return 1; -+ } - return oa - ob; - } - --- -2.7.4 - 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 deleted file mode 100644 index 02ba441..0000000 --- a/0001-Change-cleandeps-code-so-that-it-keeps-all-providers.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 4e245d61daa731ebab0ac7e0f7bd87ba6c63f116 Mon Sep 17 00:00:00 2001 -From: Michael Schroeder -Date: Tue, 14 Jun 2016 13:15:40 +0200 -Subject: [PATCH 1/2] 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/0001-Take-lockstep-into-account-when-calculating-unneeded.patch b/0001-Take-lockstep-into-account-when-calculating-unneeded.patch deleted file mode 100644 index c90f3bd..0000000 --- a/0001-Take-lockstep-into-account-when-calculating-unneeded.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 488688b06ceab6c6ab44e5649d1f1db272e7bb28 Mon Sep 17 00:00:00 2001 -From: Michael Schroeder -Date: Wed, 20 Jul 2016 13:37:39 +0200 -Subject: [PATCH] Take lockstep into account when calculating unneeded packages - ---- - src/rules.c | 30 ++++++++++++++++++++++++++++++ - 1 file changed, 30 insertions(+) - -diff --git a/src/rules.c b/src/rules.c -index 797916f..aa90b5f 100644 ---- a/src/rules.c -+++ b/src/rules.c -@@ -4388,6 +4388,36 @@ solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded) - #ifdef CLEANDEPSDEBUG - printf("adding back %s\n", pool_solvable2str(pool, s)); - #endif -+ if (s->repo == installed && pool->implicitobsoleteusescolors) -+ { -+ Id a, bestarch = 0; -+ FOR_PROVIDES(p, pp, s->name) -+ { -+ Solvable *ps = pool->solvables + p; -+ if (ps->name != s->name || ps->repo == installed) -+ continue; -+ a = ps->arch; -+ a = (a <= pool->lastarch) ? pool->id2arch[a] : 0; -+ if (a && a != 1 && (!bestarch || a < bestarch)) -+ bestarch = a; -+ } -+ if (bestarch && (s->arch > pool->lastarch || pool->id2arch[s->arch] != bestarch)) -+ { -+ FOR_PROVIDES(p, pp, s->name) -+ { -+ Solvable *ps = pool->solvables + p; -+ if (ps->repo == installed && ps->name == s->name && ps->evr == s->evr && ps->arch != s->arch && ps->arch < pool->lastarch && pool->id2arch[ps->arch] == bestarch) -+ if (!MAPTST(&im, p)) -+ { -+#ifdef CLEANDEPSDEBUG -+ printf("%s lockstep %s\n", pool_solvid2str(pool, ip), pool_solvid2str(pool, p)); -+#endif -+ MAPSET(&im, p); -+ queue_push(&iq, p); -+ } -+ } -+ } -+ } - if (s->requires) - { - reqp = s->repo->idarraydata + s->requires; --- -2.7.4 - diff --git a/0002-Improve-last-commit-so-that-self-providing-requires-.patch b/0002-Improve-last-commit-so-that-self-providing-requires-.patch deleted file mode 100644 index f3e7b1e..0000000 --- a/0002-Improve-last-commit-so-that-self-providing-requires-.patch +++ /dev/null @@ -1,50 +0,0 @@ -From b2fd114deaad01295b42a601ea66074fe8028a5c Mon Sep 17 00:00:00 2001 -From: Michael Schroeder -Date: Tue, 14 Jun 2016 14:51:22 +0200 -Subject: [PATCH 2/2] Improve last commit so that self-providing requires don't - pull in other providers - ---- - src/rules.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/src/rules.c b/src/rules.c -index 07c293a..797916f 100644 ---- a/src/rules.c -+++ b/src/rules.c -@@ -3870,6 +3870,8 @@ complex_cleandeps_addback(Pool *pool, Id ip, Id req, Map *im, Map *installedm, Q - if (!MAPTST(installedm, -p)) - break; - } -+ else if (p == ip) -+ break; - } - if (!p) - { -@@ -4399,6 +4401,11 @@ solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded) - } - #endif - FOR_PROVIDES(p, pp, req) -+ if (p == ip) -+ break; -+ if (p) -+ continue; -+ FOR_PROVIDES(p, pp, req) - { - if (MAPTST(&im, p)) - continue; -@@ -4430,6 +4437,11 @@ solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded) - } - #endif - FOR_PROVIDES(p, pp, req) -+ if (p == ip) -+ break; -+ if (p) -+ continue; -+ FOR_PROVIDES(p, pp, req) - { - if (MAPTST(&im, p)) - continue; --- -2.7.4 - diff --git a/libsolv.spec b/libsolv.spec index 685c2a4..766b881 100644 --- a/libsolv.spec +++ b/libsolv.spec @@ -52,26 +52,14 @@ %{nil} Name: lib%{libname} -Version: 0.6.22 -Release: 3%{?dist} +Version: 0.6.23 +Release: 1%{?dist} Summary: Package dependency solver License: BSD URL: https://github.com/openSUSE/libsolv Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz -# Backported patches - -# do not remove "unneeded" packages even something another provides required thing -# (broken case for 3rd shitty-rpms) -Patch0001: 0001-Change-cleandeps-code-so-that-it-keeps-all-providers.patch -Patch0002: 0002-Improve-last-commit-so-that-self-providing-requires-.patch -# when obsoleting packages - prefer same architecture -# (as we don't use %{?isa} for Obsoletes) -Patch0003: 0001-Also-look-at-the-arch-when-sorting-obsoleters.patch -# Don't show "unneded" packages after enforced multilib lockstep -Patch0004: 0001-Take-lockstep-into-account-when-calculating-unneeded.patch - BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig(rpm) @@ -319,6 +307,9 @@ popd %endif %changelog +* Wed Jul 27 2016 Igor Gnatenko - 0.6.23-1 +- Update to 0.6.23 + * Wed Jul 20 2016 Igor Gnatenko - 0.6.22-3 - Backport couple of patches from upstream diff --git a/sources b/sources index de9e845..c72602d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -33e22fc89aa41e67dae917a8a587ae73 libsolv-0.6.22.tar.gz +80098e081712368d38ade6affb39dd65 libsolv-0.6.23.tar.gz