Index: rpm/CHANGES 5.0.0 -> 5.1a1: + - jbj: fix: reverse arrows on erasure dependency graph. - rse: provide the necessary pre-processor macros to allow misc/err.h to compile with Sun Studio 12 under Solaris 10 - jbj: rpmrepo: be kind to the sqlite3 deprived. - jbj: rpmrepo: cleanly separate SQL representation from execution. Index: rpm/lib/depends.c RCS File: /v/rpm/cvs/rpm/lib/depends.c,v rcsdiff -q -kk '-r1.392' '-r1.393' -u '/v/rpm/cvs/rpm/lib/depends.c,v' 2>/dev/null --- lib/depends.c 2008/03/17 09:50:01 1.392 +++ lib/depends.c 2008/03/31 23:00:56 1.393 @@ -1592,7 +1592,7 @@ continue; /*@=abstractcompare@*/ - requires = rpmteDS(p, tsi->tsi_tagn); + requires = rpmteDS((rpmteType(p) == TR_REMOVED ? q : p), tsi->tsi_tagn); if (requires == NULL) continue; /* XXX can't happen */ (void) rpmdsSetIx(requires, tsi->tsi_reqx); @@ -1882,6 +1882,13 @@ return 0; selected[i] = 1; + /* Erasures are reversed installs. */ + if (teType == TR_REMOVED) { + rpmte r = p; + p = q; + q = r; + } + /* T3. Record next "q <- p" relation (i.e. "p" requires "q"). */ rpmteTSI(p)->tsi_count++; /* bump p predecessor count */ @@ -1899,6 +1906,7 @@ tsi->tsi_next = rpmteTSI(q)->tsi_next; rpmteTSI(q)->tsi_next = tsi; rpmteTSI(q)->tsi_qcnt++; /* bump q successor count */ + return 0; } /*@=mustmod@*/