Update to 0.6.23

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
Igor Gnatenko 2016-07-27 16:28:08 +02:00
parent 32c761f2ec
commit 10bb86621e
7 changed files with 7 additions and 217 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@
/libsolv-0.6.20.tar.gz /libsolv-0.6.20.tar.gz
/libsolv-0.6.21.tar.gz /libsolv-0.6.21.tar.gz
/libsolv-0.6.22.tar.gz /libsolv-0.6.22.tar.gz
/libsolv-0.6.23.tar.gz

View File

@ -1,31 +0,0 @@
From cfd34d63f0884b32603cdbf91c3dc952b7b35948 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
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

View File

@ -1,68 +0,0 @@
From 4e245d61daa731ebab0ac7e0f7bd87ba6c63f116 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
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

View File

@ -1,53 +0,0 @@
From 488688b06ceab6c6ab44e5649d1f1db272e7bb28 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
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

View File

@ -1,50 +0,0 @@
From b2fd114deaad01295b42a601ea66074fe8028a5c Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
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

View File

@ -52,26 +52,14 @@
%{nil} %{nil}
Name: lib%{libname} Name: lib%{libname}
Version: 0.6.22 Version: 0.6.23
Release: 3%{?dist} Release: 1%{?dist}
Summary: Package dependency solver Summary: Package dependency solver
License: BSD License: BSD
URL: https://github.com/openSUSE/libsolv URL: https://github.com/openSUSE/libsolv
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz 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: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig(rpm) BuildRequires: pkgconfig(rpm)
@ -319,6 +307,9 @@ popd
%endif %endif
%changelog %changelog
* Wed Jul 27 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.23-1
- Update to 0.6.23
* Wed Jul 20 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.22-3 * Wed Jul 20 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.22-3
- Backport couple of patches from upstream - Backport couple of patches from upstream

View File

@ -1 +1 @@
33e22fc89aa41e67dae917a8a587ae73 libsolv-0.6.22.tar.gz 80098e081712368d38ade6affb39dd65 libsolv-0.6.23.tar.gz