summaryrefslogtreecommitdiff
path: root/src/solver.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-27 14:58:05 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-27 14:58:05 +0900
commitf458102388250c8a1cbbfa8f18d27baa204c696c (patch)
tree447d75c1ae4449828e094d36a2f97f9b46b455ef /src/solver.c
parent8fcc0d8e03716077d1f2c2ca79fc622880a32196 (diff)
downloadlibsolv-f458102388250c8a1cbbfa8f18d27baa204c696c.tar.gz
libsolv-f458102388250c8a1cbbfa8f18d27baa204c696c.tar.bz2
libsolv-f458102388250c8a1cbbfa8f18d27baa204c696c.zip
Imported Upstream version 0.6.23upstream/0.6.23
Change-Id: Idc1e282dc113b7350d8e123283f1a36097b76857 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'src/solver.c')
-rw-r--r--src/solver.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/solver.c b/src/solver.c
index 4f849ec..5fca20d 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -2913,6 +2913,8 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)
lastsi = -1;
break;
}
+ if (solv->isdisfavormap.size && MAPTST(&solv->isdisfavormap, p))
+ continue;
if (lastsi < 0 && (MAPTST(&solv->recommendsmap, p) || solver_is_supplementing(solv, pool->solvables + p)))
lastsi = i;
}
@@ -2925,6 +2927,9 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)
p = -solv->branches.elements[i];
if (p <= 0 || solv->decisionmap[p] != l + 1)
continue;
+ if (solv->favormap.size && MAPTST(&solv->favormap, p))
+ if (!(solv->isdisfavormap.size && MAPTST(&solv->isdisfavormap, p)))
+ continue; /* current selection is favored */
if (!(MAPTST(&solv->recommendsmap, p) || solver_is_supplementing(solv, pool->solvables + p)))
{
lasti = lastsi;
@@ -4480,24 +4485,6 @@ solver_create_state_maps(Solver *solv, Map *installedmap, Map *conflictsmap)
pool_create_state_maps(solv->pool, &solv->decisionq, installedmap, conflictsmap);
}
-void
-solver_trivial_installable(Solver *solv, Queue *pkgs, Queue *res)
-{
- Pool *pool = solv->pool;
- Map installedmap;
- int i;
- pool_create_state_maps(pool, &solv->decisionq, &installedmap, 0);
- pool_trivial_installable_multiversionmap(pool, &installedmap, pkgs, res, solv->multiversion.size ? &solv->multiversion : 0);
- for (i = 0; i < res->count; i++)
- if (res->elements[i] != -1)
- {
- Solvable *s = pool->solvables + pkgs->elements[i];
- if (!strncmp("patch:", pool_id2str(pool, s->name), 6) && solvable_is_irrelevant_patch(s, &installedmap))
- res->elements[i] = -1;
- }
- map_free(&installedmap);
-}
-
/*-------------------------------------------------------------------
*
* decision introspection