diff options
author | jbj <devnull@localhost> | 1999-12-02 16:31:35 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-12-02 16:31:35 +0000 |
commit | 7e8b64d33591bad6c877d6fe7660107cb339d7f5 (patch) | |
tree | fedb4ae650748fa0347a9bb724fe30a7e5d71e16 /lib | |
parent | fc75f4fc82f10d3d9e72d3978beda5ef2c9171d8 (diff) | |
download | rpm-7e8b64d33591bad6c877d6fe7660107cb339d7f5.tar.gz rpm-7e8b64d33591bad6c877d6fe7660107cb339d7f5.tar.bz2 rpm-7e8b64d33591bad6c877d6fe7660107cb339d7f5.zip |
permit --whatprovides to lookup file dependencies.
CVS patchset: 3451
CVS date: 1999/12/02 16:31:35
Diffstat (limited to 'lib')
-rw-r--r-- | lib/query.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/query.c b/lib/query.c index ee7cf4f1c..317199699 100644 --- a/lib/query.c +++ b/lib/query.c @@ -568,16 +568,6 @@ int rpmQueryVerify(QVA_t *qva, enum rpmQVSources source, const char * arg, } break; - case RPMQV_WHATPROVIDES: - if (rpmdbFindByProvides(db, arg, &matches)) { - fprintf(stderr, _("no package provides %s\n"), arg); - retcode = 1; - } else { - retcode = showMatches(qva, db, matches, showPackage); - dbiFreeIndexRecord(matches); - } - break; - case RPMQV_TRIGGEREDBY: if (rpmdbFindByTriggeredBy(db, arg, &matches)) { fprintf(stderr, _("no package triggers %s\n"), arg); @@ -598,6 +588,18 @@ int rpmQueryVerify(QVA_t *qva, enum rpmQVSources source, const char * arg, } break; + case RPMQV_WHATPROVIDES: + if (arg[0] != '/') { + if (rpmdbFindByProvides(db, arg, &matches)) { + fprintf(stderr, _("no package provides %s\n"), arg); + retcode = 1; + } else { + retcode = showMatches(qva, db, matches, showPackage); + dbiFreeIndexRecord(matches); + } + break; + } + /*@fallthrough@*/ case RPMQV_PATH: if (rpmdbFindByFile(db, arg, &matches)) { int myerrno = 0; |