Skip to content

Commit

Permalink
Take advantage on RPMDBI_INSTFILENAMES in rpmdbProvides()
Browse files Browse the repository at this point in the history
- No functional changes, we did the same thing "manually" here already.
  Only now the data is more conveniently available through API to
  other callers who might care (yum & friends)
  • Loading branch information
pmatilai committed Aug 29, 2011
1 parent 0e01c69 commit 95dae81
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions lib/depends.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,19 +351,10 @@ static int rpmdbProvides(rpmts ts, depCache dcache, rpmds dep)
* not installed files can not satisfy a dependency.
*/
if (Name[0] == '/') {
mi = rpmtsPrunedIterator(ts, RPMDBI_BASENAMES, Name);
mi = rpmtsPrunedIterator(ts, RPMDBI_INSTFILENAMES, Name);
while ((h = rpmdbNextIterator(mi)) != NULL) {
int fs = RPMFILE_STATE_MISSING;
struct rpmtd_s states;
if (headerGet(h, RPMTAG_FILESTATES, &states, HEADERGET_MINMEM)) {
rpmtdSetIndex(&states, rpmdbGetIteratorFileNum(mi));
fs = rpmtdGetNumber(&states);
rpmtdFreeData(&states);
}
if (fs == RPMFILE_STATE_NORMAL || fs == RPMFILE_STATE_NETSHARED) {
rpmdsNotify(dep, "(db files)", rc);
break;
}
rpmdsNotify(dep, "(db files)", rc);
break;
}
rpmdbFreeIterator(mi);
}
Expand Down

0 comments on commit 95dae81

Please sign in to comment.