libsolv/0001-Change-cleandeps-code-so-that-it-keeps-all-providers.patch
Igor Gnatenko 85f459dbd0 Update to 0.6.22
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2016-06-14 14:25:55 +02:00

69 lines
1.7 KiB
Diff

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] 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