summaryrefslogtreecommitdiff
path: root/src/solver.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-27 14:54:32 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-27 14:54:33 +0900
commit9d82811ac90c5db61fca60e3e7c95ba58bc66393 (patch)
tree14fd1327bfb65babc5a84f7c719eb3c723035b6b /src/solver.c
parent1a93853889c819ac2d3c8e83e856f4775e664b00 (diff)
downloadlibsolv-upstream/0.6.12.tar.gz
libsolv-upstream/0.6.12.tar.bz2
libsolv-upstream/0.6.12.zip
Imported Upstream version 0.6.12upstream/0.6.12
Change-Id: I57ee1847c5c25f2602e0348213fa145f97cc3434 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'src/solver.c')
-rw-r--r--src/solver.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/solver.c b/src/solver.c
index f551731..b89e0d1 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -117,6 +117,29 @@ solver_dep_fulfilled_alreadyinstalled(Solver *solv, Id dep)
if (ISRELDEP(dep))
{
Reldep *rd = GETRELDEP(pool, dep);
+ if (rd->flags == REL_COND)
+ {
+ int r1, r2;
+ if (ISRELDEP(rd->evr))
+ {
+ Reldep *rd2 = GETRELDEP(pool, rd->evr);
+ if (rd2->flags == REL_ELSE)
+ {
+ r1 = solver_dep_fulfilled_alreadyinstalled(solv, rd2->name);
+ if (r1)
+ {
+ r2 = solver_dep_fulfilled_alreadyinstalled(solv, rd->name);
+ return r2 && r1 == 2 ? 2 : r2;
+ }
+ return solver_dep_fulfilled_alreadyinstalled(solv, rd2->evr);
+ }
+ }
+ r1 = solver_dep_fulfilled_alreadyinstalled(solv, rd->name);
+ r2 = !solver_dep_fulfilled_alreadyinstalled(solv, rd->evr);
+ if (!r1 && !r2)
+ return 0;
+ return r1 == 2 ? 2 : 1;
+ }
if (rd->flags == REL_AND)
{
int r2, r1 = solver_dep_fulfilled_alreadyinstalled(solv, rd->name);