/* 3: added triggers */
/* 4: fixed triggers */
/* 5: fixed checksum copying */
-#define RPMDB_COOKIE_VERSION 5
+/* 6: add SOLVABLE_PREREQ_IGNOREINST support */
+/* 7: fix bug in ignoreinst logic */
+#define RPMDB_COOKIE_VERSION 7
#define TAG_NAME 1000
#define TAG_VERSION 1001
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);
}
s->supplements = makedeps(pool, repo, rpmhead, TAG_SUPPLEMENTNAME, TAG_SUPPLEMENTVERSION, TAG_SUPPLEMENTFLAGS, 0, 0);
s->enhances = makedeps(pool, repo, rpmhead, TAG_ENHANCENAME, TAG_ENHANCEVERSION, TAG_ENHANCEFLAGS, 0, 0);
- s->supplements = repo_fix_supplements(repo, s->provides, s->supplements, 0);
- s->conflicts = repo_fix_conflicts(repo, s->conflicts);
+ repo_rewrite_suse_deps(s, 0);
if (data && ignq.count)
repodata_set_idarray(data, s - pool->solvables, SOLVABLE_PREREQ_IGNOREINST, &ignq);
if ((flags & RPM_ITERATE_FILELIST_WITHCOL) != 0)
{
co = headint32array(rpmhead, TAG_FILECOLORS, &cnt2);
- if (!co || cnt != cnt2)
+ if (co && cnt != cnt2)
{
solv_free(co);
solv_free(md);
info.digest = md5;
}
}
- if (co)
- info.color = co[i];
+ info.color = co ? co[i] : 0;
(*cb)(cbdata, space, &info);
}
solv_free(space);