From 9ad57bda4a82b9847826daa766b4421d877bb3d9 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 29 Aug 2011 16:19:32 +0300 Subject: [PATCH] Use RPMDBI_INSTFILENAMES on file queries as well - 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. --- lib/query.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/query.c b/lib/query.c index 73d64e3..1e42954 100644 --- a/lib/query.c +++ b/lib/query.c @@ -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); -- 2.7.4