diff options
author | ewt <devnull@localhost> | 1999-04-07 05:31:28 +0000 |
---|---|---|
committer | ewt <devnull@localhost> | 1999-04-07 05:31:28 +0000 |
commit | 1e9035b3b9ae3701fa56ceeb7a3a2a5fab88800e (patch) | |
tree | c6d207b56738b5cfc659897d96de10b32d95098a /lib/depends.c | |
parent | 4606c3415399da816dea7f2567d88bfb22b87644 (diff) | |
download | librpm-tizen-1e9035b3b9ae3701fa56ceeb7a3a2a5fab88800e.tar.gz librpm-tizen-1e9035b3b9ae3701fa56ceeb7a3a2a5fab88800e.tar.bz2 librpm-tizen-1e9035b3b9ae3701fa56ceeb7a3a2a5fab88800e.zip |
when we're upgrading from one version to the same version, don't regard
that as a true upgrade -- the old package should be left out of the
remove list
CVS patchset: 2960
CVS date: 1999/04/07 05:31:28
Diffstat (limited to 'lib/depends.c')
-rw-r--r-- | lib/depends.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/depends.c b/lib/depends.c index 397bb6af7..270dc190a 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -284,8 +284,17 @@ int rpmtransAddPackage(rpmTransactionSet rpmdep, Header h, FD_t fd, headerGetEntry(h, RPMTAG_NAME, NULL, (void *) &name, &count); if (!rpmdbFindPackage(rpmdep->db, name, &matches)) { + Header h2; + for (i = 0; i < dbiIndexSetCount(matches); i++) { - removePackage(rpmdep, dbiIndexRecordOffset(matches, i), alNum); + h2 = rpmdbGetRecord(rpmdep->db, dbiIndexRecordOffset(matches, i)); + if (h2) { + if (rpmVersionCompare(h, h2)) { + removePackage(rpmdep, dbiIndexRecordOffset(matches, i), + alNum); + } + headerFree(h2); + } } dbiFreeIndexRecord(matches); |