summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-27 14:57:58 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-27 14:57:58 +0900
commit8fcc0d8e03716077d1f2c2ca79fc622880a32196 (patch)
tree863163a13f269150c07ed7e9f0dfd289524e4140 /src
parentbc8d0a48b41d6cc4d79f1c062dda7ed230841644 (diff)
downloadlibsolv-8fcc0d8e03716077d1f2c2ca79fc622880a32196.tar.gz
libsolv-8fcc0d8e03716077d1f2c2ca79fc622880a32196.tar.bz2
libsolv-8fcc0d8e03716077d1f2c2ca79fc622880a32196.zip
Imported Upstream version 0.6.22upstream/0.6.22
Change-Id: Icb5f02bbb5483b043599397906113d6e6662ce3b Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/policy.c33
1 files changed, 27 insertions, 6 deletions
diff --git a/src/policy.c b/src/policy.c
index 3a0a737..7ed52d9 100644
--- a/src/policy.c
+++ b/src/policy.c
@@ -1231,8 +1231,15 @@ urpm_reorder(Solver *solv, Queue *plist)
if (knid)
{
FOR_PROVIDES(p, pp, knid)
- if (solv->decisionmap[p] > 0 || (pool->installed && pool->solvables[p].repo == pool->installed))
- score = 3;
+ {
+ if (solv->decisionmap[p] > 0)
+ {
+ score = 4;
+ break;
+ }
+ else if (pool->installed && pool->solvables[p].repo == pool->installed)
+ score = 3;
+ }
}
}
}
@@ -1257,8 +1264,15 @@ urpm_reorder(Solver *solv, Queue *plist)
if (knid)
{
FOR_PROVIDES(p, pp, knid)
- if (solv->decisionmap[p] > 0 || (pool->installed && pool->solvables[p].repo == pool->installed))
- score = 3;
+ {
+ if (solv->decisionmap[p] > 0)
+ {
+ score = 4;
+ break;
+ }
+ if (pool->installed && pool->solvables[p].repo == pool->installed)
+ score = 3;
+ }
}
}
}
@@ -1284,8 +1298,15 @@ urpm_reorder(Solver *solv, Queue *plist)
{
score = 0;
FOR_PROVIDES(p, pp, id)
- if (solv->decisionmap[p] > 0 || (pool->installed && pool->solvables[p].repo == pool->installed))
- score = 3;
+ {
+ if (solv->decisionmap[p] > 0)
+ {
+ score = 4;
+ break;
+ }
+ if (pool->installed && pool->solvables[p].repo == pool->installed)
+ score = 3;
+ }
break;
}
}