summaryrefslogtreecommitdiff
path: root/ext
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 /ext
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 'ext')
-rw-r--r--ext/repo_rpmdb.c28
1 files changed, 17 insertions, 11 deletions
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);
}