summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-09-07 23:04:12 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-09-08 07:51:02 +0300
commit33d79b470e456debc130230bc966b07d9713ad93 (patch)
tree8055f60f325f6c3777b253e9cd16cb8fa6d17a85
parentd2eb366a9040690e95b632b9318d7b95788e31d8 (diff)
downloadrpm-33d79b470e456debc130230bc966b07d9713ad93.tar.gz
rpm-33d79b470e456debc130230bc966b07d9713ad93.tar.bz2
rpm-33d79b470e456debc130230bc966b07d9713ad93.zip
Lift the remaining oddball case out of rpmQueryVerify()
- specfile queries are handled differently from everything else, handle the special case in rpmcliArgIter()
-rw-r--r--lib/query.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/query.c b/lib/query.c
index cfbded620..ae3349781 100644
--- a/lib/query.c
+++ b/lib/query.c
@@ -310,10 +310,6 @@ static int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
return 1;
switch (qva->qva_source) {
- case RPMQV_SPECFILE:
- res = ((qva->qva_specQuery != NULL)
- ? qva->qva_specQuery(ts, qva, arg) : 1);
- break;
case RPMQV_GROUP:
mi = rpmtsInitIterator(ts, RPMTAG_GROUP, arg, 0);
if (mi == NULL) {
@@ -506,7 +502,7 @@ static int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
break;
}
- if (qva->qva_source != RPMQV_SPECFILE && mi != NULL) {
+ if (mi != NULL) {
res = rpmcliShowMatches(qva, ts, mi);
mi = rpmdbFreeIterator(mi);
}
@@ -568,6 +564,12 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, ARGV_const_t argv)
gi = rpmgiFree(gi);
break;
}
+ case RPMQV_SPECFILE:
+ for (ARGV_const_t arg = argv; arg && *arg; arg++) {
+ ec += ((qva->qva_specQuery != NULL)
+ ? qva->qva_specQuery(ts, qva, *arg) : 1);
+ }
+ break;
default:
for (ARGV_const_t arg = argv; arg && *arg; arg++)
ec += rpmQueryVerify(qva, ts, *arg);