Skip to content

Commit

Permalink
Use RPMDBI_INSTFILENAMES on file queries as well
Browse files Browse the repository at this point in the history
- This changes query behavior quite a bit as files with non-installed
  status are no longer returned as matches. The rationale is that
  it makes figuring out dependency issues with the "new" behavior
  more obvious (but perhaps we should have a switch to enable
  former behavior). Besides not satisfying dependencies, files with
  non-installed status are not really owned by the package, as they
  would not be removed on package removal.
  • Loading branch information
pmatilai committed Aug 29, 2011
1 parent 95dae81 commit 9ad57bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/query.c
Expand Up @@ -409,7 +409,8 @@ static rpmdbMatchIterator initQueryIterator(QVA_t qva, rpmts ts, const char * ar
fn = xstrdup(arg);
(void) rpmCleanPath(fn);

mi = rpmtsInitIterator(ts, RPMDBI_BASENAMES, fn, 0);
/* XXX Add a switch to enable former BASENAMES behavior? */
mi = rpmtsInitIterator(ts, RPMDBI_INSTFILENAMES, fn, 0);
if (mi == NULL)
mi = rpmtsInitIterator(ts, RPMDBI_PROVIDENAME, fn, 0);

Expand Down

0 comments on commit 9ad57bd

Please sign in to comment.