poldek: poldek/install3/conflicts.c - fixed conflict resolving - r...
mis
mis at pld-linux.org
Sun Feb 24 14:57:33 CET 2008
Author: mis Date: Sun Feb 24 13:57:33 2008 GMT
Module: poldek Tag: HEAD
---- Log message:
- fixed conflict resolving - replacements with the same conflicts are skipped
---- Files affected:
poldek/poldek/install3:
conflicts.c (1.5 -> 1.6)
---- Diffs:
================================================================
Index: poldek/poldek/install3/conflicts.c
diff -u poldek/poldek/install3/conflicts.c:1.5 poldek/poldek/install3/conflicts.c:1.6
--- poldek/poldek/install3/conflicts.c:1.5 Sat Feb 2 16:38:37 2008
+++ poldek/poldek/install3/conflicts.c Sun Feb 24 14:57:28 2008
@@ -18,7 +18,7 @@
static
int find_replacement(struct i3ctx *ictx, struct pkg *pkg,
- struct pkg **rpkg)
+ const struct capreq *cnfl, struct pkg **rpkg)
{
tn_array *pkgs;
struct pkgset *ps;
@@ -33,6 +33,10 @@
struct pkg *p = n_array_nth(pkgs, i);
if (!pkg_is_kind_of(p, pkg))
continue;
+
+ /* still conflicted */
+ if (p->cnfls && n_array_bsearch(p->cnfls, cnfl))
+ continue;
if (pkg_cmp_evr(p, pkg) > 0) {
*rpkg = p;
@@ -44,6 +48,14 @@
if (*rpkg == NULL && (pkgs = pkgset_search(ps, PS_SEARCH_OBSL, pkg->name))) {
for (i=0; i < n_array_size(pkgs); i++) {
struct pkg *p = n_array_nth(pkgs, i);
+
+ if (!pkg_is_kind_of(p, pkg))
+ continue;
+
+ /* still conflicted */
+ if (p->cnfls && n_array_bsearch(p->cnfls, cnfl))
+ continue;
+
if (pkg_caps_obsoletes_pkg_caps(p, pkg) &&
pkg_cmp_name_evr(p, pkg) > 0) { /* XXX bug propably, testit */
*rpkg = p;
@@ -98,7 +110,7 @@
capreq_revrel(req);
if (!found) {
- found = find_replacement(ictx, dbpkg, &tomark);
+ found = find_replacement(ictx, dbpkg, cnfl, &tomark);
by_replacement = 1;
} else {
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/install3/conflicts.c?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list