]> TLD Linux GIT Repositories - packages/rpm.git/blob - rpm-rpm5-patchset-10061.patch
- package /usr/lib/rpm/macros.d dir
[packages/rpm.git] / rpm-rpm5-patchset-10061.patch
1 Index: rpm/CHANGES
2  5.0.0 -> 5.1a1:
3 +    - jbj: fix: reverse arrows on erasure dependency graph.
4      - rse: provide the necessary pre-processor macros to allow misc/err.h to compile with Sun Studio 12 under Solaris 10
5      - jbj: rpmrepo: be kind to the sqlite3 deprived.
6      - jbj: rpmrepo: cleanly separate SQL representation from execution.
7 Index: rpm/lib/depends.c
8 RCS File: /v/rpm/cvs/rpm/lib/depends.c,v
9 rcsdiff -q -kk '-r1.392' '-r1.393' -u '/v/rpm/cvs/rpm/lib/depends.c,v' 2>/dev/null
10 --- lib/depends.c       2008/03/17 09:50:01     1.392
11 +++ lib/depends.c       2008/03/31 23:00:56     1.393
12 @@ -1592,7 +1592,7 @@
13             continue;
14         /*@=abstractcompare@*/
15  
16 -       requires = rpmteDS(p, tsi->tsi_tagn);
17 +       requires = rpmteDS((rpmteType(p) == TR_REMOVED ? q : p), tsi->tsi_tagn);
18         if (requires == NULL) continue;         /* XXX can't happen */
19  
20         (void) rpmdsSetIx(requires, tsi->tsi_reqx);
21 @@ -1882,6 +1882,13 @@
22         return 0;
23      selected[i] = 1;
24  
25 +    /* Erasures are reversed installs. */
26 +    if (teType == TR_REMOVED) {
27 +       rpmte r = p;
28 +       p = q;
29 +       q = r;
30 +    }
31 +
32      /* T3. Record next "q <- p" relation (i.e. "p" requires "q"). */
33      rpmteTSI(p)->tsi_count++;                  /* bump p predecessor count */
34  
35 @@ -1899,6 +1906,7 @@
36      tsi->tsi_next = rpmteTSI(q)->tsi_next;
37      rpmteTSI(q)->tsi_next = tsi;
38      rpmteTSI(q)->tsi_qcnt++;                   /* bump q successor count */
39 +
40      return 0;
41  }
42  /*@=mustmod@*/