diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-03-19 19:04:07 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-03-19 19:04:07 +0200 |
commit | a2156379641e48fbad88d1088eb06d7bfa78927c (patch) | |
tree | 24c6e721c397636a76ffc2aabfad474e2ed8a752 /lib/query.c | |
parent | ad43e72d70604eac223fd20c97ca990fa4936ac6 (diff) | |
download | librpm-tizen-a2156379641e48fbad88d1088eb06d7bfa78927c.tar.gz librpm-tizen-a2156379641e48fbad88d1088eb06d7bfa78927c.tar.bz2 librpm-tizen-a2156379641e48fbad88d1088eb06d7bfa78927c.zip |
Pass args and flags to rpmgi constructor already, lose rpmgiSetArgs()
- tags and the like to constructor make no sense anymore, rpmgi
does nothing but walk manifests and files from argv
- simplifies things further...
Diffstat (limited to 'lib/query.c')
-rw-r--r-- | lib/query.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/lib/query.c b/lib/query.c index d3f92b2cc..9cf270847 100644 --- a/lib/query.c +++ b/lib/query.c @@ -531,19 +531,6 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg) return res; } -static int rpmcliArgIterHelper(rpmts ts, QVA_t qva, rpmTag tag, ARGV_const_t argv, rpmgiFlags gFlgs) -{ - int ec = 0; - - qva->qva_gi = rpmgiNew(ts, tag, NULL, 0); - rpmgiSetArgs(qva->qva_gi, argv, gFlgs); - - /* FIX: argv can be NULL, cast to pass argv array */ - ec = rpmQueryVerify(qva, ts, (tag == RPMDBI_PACKAGES)? (const char *) argv : NULL); - qva->qva_gi = rpmgiFree(qva->qva_gi); - return ec; -} - /* * Apply extra query filters. By default patterns applied to package * name, others can be specified with <tagname>=<pattern> @@ -596,7 +583,9 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, ARGV_const_t argv) } break; case RPMQV_RPM: - ec = rpmcliArgIterHelper(ts, qva, RPMDBI_ARGLIST, argv, giFlags); + qva->qva_gi = rpmgiNew(ts, giFlags, argv); + ec = rpmQueryVerify(qva, ts, NULL); + qva->qva_gi = rpmgiFree(qva->qva_gi); break; default: for (ARGV_const_t arg = argv; arg && *arg; arg++) |