]>
Commit | Line | Data |
---|---|---|
1 | diff -urN poldek-0.18.6.org/pkgset-install.c poldek-0.18.6/pkgset-install.c | |
2 | --- poldek-0.18.6.org/pkgset-install.c 2004-08-27 23:45:01.761428320 +0200 | |
3 | +++ poldek-0.18.6/pkgset-install.c 2004-08-27 23:47:40.965225664 +0200 | |
4 | @@ -319,7 +319,7 @@ | |
5 | int *ncnfls, i, j, i_best, cnfl_min; | |
6 | int i_ver_eq = -1, i_evr_eq = -1; | |
7 | ||
8 | - DBGF("%s (%d)\n", pkg_snprintf_s(marker), npkgs); | |
9 | + DBGF("marker=%s (%d)\n", marker ? pkg_snprintf_s(marker) : "nil", npkgs); | |
10 | n_assert(npkgs > 0); | |
11 | if (npkgs == 1) | |
12 | return 0; | |
13 | @@ -332,10 +332,10 @@ | |
14 | struct pkg *pkg = candidates[i]; | |
15 | ||
16 | DBGF("%d. %s %s (color white %d, marked %d, %p)\n", i, | |
17 | - pkg_snprintf_s(marker), pkg_snprintf_s0(pkg), | |
18 | + marker ? pkg_snprintf_s(marker) : "nil", pkg_snprintf_s0(pkg), | |
19 | pkg_is_color(pkg, PKG_COLOR_WHITE), pkg_is_marked(pkg), pkg); | |
20 | ||
21 | - if (pkg_eq_name_prefix(marker, pkg)) { | |
22 | + if (marker && pkg_eq_name_prefix(marker, pkg)) { | |
23 | if (i_evr_eq == -1 && pkg_cmp_evr(marker, pkg) == 0) | |
24 | i_evr_eq = i; | |
25 | ||
26 | @@ -758,8 +758,8 @@ | |
27 | for (i=0; i < n_array_size(db_dep->pkgs); i++) { | |
28 | struct pkg *p = n_array_nth(db_dep->pkgs, i); | |
29 | ||
30 | - snprintf(&errmsg[n], sizeof(errmsg) - n, "%s %s", | |
31 | - pkg_is_installed(p) ? "" : " already marked", | |
32 | + snprintf(&errmsg[n], sizeof(errmsg) - n, "%s%s", | |
33 | + pkg_is_installed(p) ? "" : " already marked ", | |
34 | pkg_snprintf_s(p)); | |
35 | ||
36 | logn(LOGERR, "%s", errmsg); | |
37 | @@ -1137,10 +1137,9 @@ | |
38 | n = upg->inst->askpkg_fn(capreq_snprintf_s(req), | |
39 | tomark_candidates, tomark); | |
40 | real_tomark = tomark_candidates[n]; | |
41 | - } | |
42 | - | |
43 | free(tomark_candidates); | |
44 | tomark_candidates = NULL; | |
45 | + } | |
46 | ||
47 | if (marked_for_removal_by_req(real_tomark, req, upg)) { | |
48 | logn(LOGERR, _("%s (cap %s) is required by %s%s"), | |
49 | @@ -1177,6 +1176,7 @@ | |
50 | } else { | |
51 | p = select_successor(pkg, ps, upg, &by_obsoletes); | |
52 | } | |
53 | + | |
54 | #if 0 /* code "moved" above cause to aggresive_greedy */ | |
55 | p = select_pkg(pkg->name, ps->pkgs, upg); | |
56 | if (p == NULL && (upg->inst->flags & INSTS_OBSOLETES)) { | |
57 |