diff options
-rw-r--r-- | NEWS | 20 | ||||
-rw-r--r-- | VERSION.cmake | 2 | ||||
-rw-r--r-- | examples/solv/solv.c | 12 | ||||
-rw-r--r-- | ext/repo_rpmdb.c | 28 | ||||
-rw-r--r-- | package/libsolv.changes | 7 | ||||
-rw-r--r-- | src/policy.c | 33 |
6 files changed, 82 insertions, 20 deletions
@@ -2,6 +2,26 @@ This file contains the major changes between libsolv versions: +Version 0.6.21 +- new features: + * SOLVER_FAVOR and SOLVER_DISFAVOR job types +- new functions: + * selection_make_matchdepid + * pool_whatcontainsdep + * pool_parserpmrichdep + +Version 0.6.20 +- new features: + * filter Requires(pre,post) for installed packages + +Version 0.6.13: +- new features: + * SOLVER_ALLOWUNINSTALL job type + * ordercycle introspection +- new functions: + * transaction_order_get_cycle + * transaction_order_get_cycleids + Version 0.6.12: - new features: * tcl bindings diff --git a/VERSION.cmake b/VERSION.cmake index f0d0476..2da1637 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -49,5 +49,5 @@ SET(LIBSOLVEXT_SOVERSION "0") SET(LIBSOLV_MAJOR "0") SET(LIBSOLV_MINOR "6") -SET(LIBSOLV_PATCH "21") +SET(LIBSOLV_PATCH "22") diff --git a/examples/solv/solv.c b/examples/solv/solv.c index e12a686..814f7e1 100644 --- a/examples/solv/solv.c +++ b/examples/solv/solv.c @@ -767,7 +767,17 @@ rerunsolver: acnt = solver_alternatives_count(solv); if (acnt) { - printf("Have %d alternatives\n\n", acnt); + if (acnt == 1) + printf("Have one alternative:\n"); + else + printf("Have %d alternatives:\n", acnt); + for (i = 1; i <= acnt; i++) + { + Id id, from; + int atype = solver_get_alternative(solv, i, &id, &from, 0, 0, 0); + printf(" - %s\n", solver_alternative2str(solv, atype, id, from)); + } + printf("\n"); answer = yesno("OK to continue (y/n/a)? ", 'a'); } else diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index 92aef31..9445023 100644 --- a/ext/repo_rpmdb.c +++ b/ext/repo_rpmdb.c @@ -55,7 +55,8 @@ /* 4: fixed triggers */ /* 5: fixed checksum copying */ /* 6: add SOLVABLE_PREREQ_IGNOREINST support */ -#define RPMDB_COOKIE_VERSION 6 +/* 7: fix bug in ignoreinst logic */ +#define RPMDB_COOKIE_VERSION 7 #define TAG_NAME 1000 #define TAG_VERSION 1001 @@ -588,18 +589,23 @@ makedeps(Pool *pool, Repo *repo, RpmHead *rpmhead, int tagn, int tagv, int tagf, solv_free(n); solv_free(v); solv_free(f); - if (has_ign && ignq->count > 2) + if (ignq && ignq->count) { - Id id, lastid = 0; - int j; - - solv_sort(ignq->elements, ignq->count / 2, sizeof(Id) * 2, ignq_sortcmp, 0); - for (i = j = 0; i < ignq->count; i += 2) + int j = 0; + if (has_ign && ignq->count == 2) + j = 1; + else if (has_ign) { - id = ignq->elements[i]; - if (id != lastid && ignq->elements[i + 1] > 0) - ignq->elements[j++] = id; - lastid = id; + Id id, lastid = 0; + + solv_sort(ignq->elements, ignq->count / 2, sizeof(Id) * 2, ignq_sortcmp, 0); + for (i = j = 0; i < ignq->count; i += 2) + { + id = ignq->elements[i]; + if (id != lastid && ignq->elements[i + 1] > 0) + ignq->elements[j++] = id; + lastid = id; + } } queue_truncate(ignq, j); } diff --git a/package/libsolv.changes b/package/libsolv.changes index b6c04a7..02d4b31 100644 --- a/package/libsolv.changes +++ b/package/libsolv.changes @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Tue Jun 7 11:24:47 CEST 2016 - mls@suse.de + +- fix bug in bug in ignoreinst logic [bnc#983141] + +------------------------------------------------------------------- Wed May 18 15:09:56 CEST 2016 - mls@suse.de - add pool->setdisttype to the bindings @@ -9,7 +14,7 @@ Wed May 18 15:09:56 CEST 2016 - mls@suse.de - add SOLVER_FAVOR and SOLVER_DISFAVOR job types - allow unknown archs in pool_setarch - add the SOLVER_FLAG_URPM_REORDER solver flag -- fix segfault in cshash dedup code +- fix segfault in cshash dedup code [bnc#980901] - fix supplements handling when implicitobsoleteusescolors is set - bump version to 0.6.21 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; } } |