diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2022-09-21 09:39:02 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2022-09-21 09:39:02 +0900 |
commit | 11600c0259c8cd27ad8c87b16421e65030b4b126 (patch) | |
tree | 55fd3687e529f3dfb9abe83e5d5e7d5b347cbcbe /src/solver.c | |
parent | 5f5ff9576322b449fca131df791f4748e412df5f (diff) | |
download | libsolv-11600c0259c8cd27ad8c87b16421e65030b4b126.tar.gz libsolv-11600c0259c8cd27ad8c87b16421e65030b4b126.tar.bz2 libsolv-11600c0259c8cd27ad8c87b16421e65030b4b126.zip |
Imported Upstream version 0.7.21upstream/0.7.21
Diffstat (limited to 'src/solver.c')
-rw-r--r-- | src/solver.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/solver.c b/src/solver.c index 1dc2c78..23285ff 100644 --- a/src/solver.c +++ b/src/solver.c @@ -1475,6 +1475,8 @@ solver_get_flag(Solver *solv, int flag) return solv->install_also_updates; case SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED: return solv->only_namespace_recommended; + case SOLVER_FLAG_STRICT_REPO_PRIORITY: + return solv->strict_repo_priority; default: break; } @@ -1568,6 +1570,9 @@ solver_set_flag(Solver *solv, int flag, int value) case SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED: solv->only_namespace_recommended = value; break; + case SOLVER_FLAG_STRICT_REPO_PRIORITY: + solv->strict_repo_priority = value; + break; default: break; } @@ -4124,6 +4129,11 @@ solver_solve(Solver *solv, Queue *job) else solv->recommendsrules = solv->recommendsrules_end = solv->nrules; + if (solv->strict_repo_priority) + solver_addstrictrepopriorules(solv, &addedmap); + else + solv->strictrepopriorules = solv->strictrepopriorules_end = solv->nrules; + if (1) solver_addchoicerules(solv); else @@ -4139,7 +4149,19 @@ solver_solve(Solver *solv, Queue *job) map_free(&installcandidatemap); queue_free(&q); - POOL_DEBUG(SOLV_DEBUG_STATS, "%d pkg rules, 2 * %d update rules, %d job rules, %d infarch rules, %d dup rules, %d choice rules, %d best rules, %d yumobs rules\n", solv->pkgrules_end - 1, solv->updaterules_end - solv->updaterules, solv->jobrules_end - solv->jobrules, solv->infarchrules_end - solv->infarchrules, solv->duprules_end - solv->duprules, solv->choicerules_end - solv->choicerules, solv->bestrules_end - solv->bestrules, solv->yumobsrules_end - solv->yumobsrules); + POOL_DEBUG(SOLV_DEBUG_STATS, "%d pkg rules, 2 * %d update rules, %d job rules, %d infarch rules, %d dup rules, %d choice rules, %d best rules, %d yumobs rules\n", + solv->pkgrules_end - 1, + solv->updaterules_end - solv->updaterules, + solv->jobrules_end - solv->jobrules, + solv->infarchrules_end - solv->infarchrules, + solv->duprules_end - solv->duprules, + solv->choicerules_end - solv->choicerules, + solv->bestrules_end - solv->bestrules, + solv->yumobsrules_end - solv->yumobsrules); + POOL_DEBUG(SOLV_DEBUG_STATS, "%d black rules, %d recommends rules, %d repo priority rules\n", + solv->blackrules_end - solv->blackrules, + solv->recommendsrules_end - solv->recommendsrules, + solv->strictrepopriorules_end - solv->strictrepopriorules); POOL_DEBUG(SOLV_DEBUG_STATS, "overall rule memory used: %d K\n", solv->nrules * (int)sizeof(Rule) / 1024); /* create weak map */ |