- Fix oversight in commit
9fb81eac0bcd239e46459f72916099f1adfc5cb9:
rpmdsMatchesDep() works on provides, but obsoletes are matched on
package name so we want rpmdsNVRMatchesDep(). rpmdsMatchesDep()
"worked" as the implicit self-provide is always at the 0 index
on packages created by modern rpmbuild, but this isn't really
guaranteed: very old V3 rpms can have something else at the
first index, and ditto for non-rpmbuild created packages.
- Thanks to Michael Schroeder for pointing this out.
mi = rpmtsPrunedIterator(ts, dbtag, Name, prune);
while ((h = rpmdbNextIterator(mi)) != NULL) {
- if (rpmdsMatchesDep(h, rpmdbGetIteratorFileNum(mi), dep, _rpmds_nopromote)) {
+ int match;
+ if (dbtag == RPMDBI_OBSOLETENAME) {
+ match = rpmdsNVRMatchesDep(h, dep, _rpmds_nopromote);
+ } else {
+ match = rpmdsMatchesDep(h, rpmdbGetIteratorFileNum(mi), dep,
+ _rpmds_nopromote);
+ }
+ if (match) {
rpmdsNotify(dep, "(db provides)", rc);
break;
}