]> git.pld-linux.org Git - packages/poldek.git/blame - poldek-dont-lose-deps.patch
- rel 39; fix patch
[packages/poldek.git] / poldek-dont-lose-deps.patch
CommitLineData
340609bb
MB
1diff -urN a/install3/misc.c b/install3/misc.c
2--- a/install3/misc.c 2009-11-22 01:39:59.000000000 +0100
3+++ b/install3/misc.c 2009-11-22 01:35:25.795536883 +0100
4@@ -319,7 +319,7 @@
5 for (i=0; i < n_array_size(candidates); i++) {
6 struct pkg *cand = n_array_nth(candidates, i);
7
8- if (pkg_is_colored_like(cand, marker)) {
9+ if (!pkg_isset_mf(ictx->processed, cand, PKGMARK_BLACK) && pkg_is_colored_like(cand, marker)) {
10 if (tmp == NULL)
11 tmp = n_array_clone(candidates);
12
13@@ -354,7 +354,7 @@
14 struct pkg **best_pkg, tn_array *candidates)
15 {
16 tn_array *suspkgs = NULL, *tmpkgs;
17- int found = 0;
18+ int found = 0, i;
19
20 *best_pkg = NULL;
21 found = pkgset_find_match_packages(ictx->ps, pkg, req, &suspkgs, 1);//ictx->strict);
22@@ -391,6 +391,16 @@
23
24 //trace(indent, "after removed rmmarked -> %d package(s)",
25 // n_array_size(suspkgs));
26+
27+ /* remove marked as BLACK from suspected packages, they have broken deps */
28+ for (i = 0; i < n_array_size(suspkgs); i++) {
29+ struct pkg *suspkg = n_array_nth(suspkgs, i);
30+
31+ if (pkg_isset_mf(ictx->processed, suspkg, PKGMARK_BLACK)) {
32+ trace(indent, "- marked as BLACK %s", pkg_id(suspkg));
33+ n_array_remove_nth(suspkgs, i--);
34+ }
35+ }
36
37 if (n_array_size(suspkgs) == 0) {
38 found = 0;
fbbda827
MB
39diff -urN a/install3/process.c b/install3/process.c
40--- a/install3/process.c 2009-11-22 01:39:38.000000000 +0100
41+++ b/install3/process.c 2009-11-22 19:41:42.862076125 +0100
42@@ -77,6 +77,11 @@
43 i3_forget_error(ictx, pkg);
44 }
45 }
46+
47+ /* this package may be used again and we have to process it (do not
48+ * stop on the first condition in i3_process_package()) to generate
49+ * new ->obsoletedby as we removed them here. */
50+ pkg_clr_mf(ictx->processed, i3pkg->pkg, PKGMARK_GRAY);
51
52 if (i3pkg->markedby) {
53 indent = inc_indent(indent);
This page took 0.038953 seconds and 4 git commands to generate.