71e9491cb0
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
54 lines
1.7 KiB
Diff
54 lines
1.7 KiB
Diff
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
|
|
|