diff options
author | ewt <devnull@localhost> | 1996-06-09 21:47:42 +0000 |
---|---|---|
committer | ewt <devnull@localhost> | 1996-06-09 21:47:42 +0000 |
commit | db0e2d93fa8ce8f13fe2a10ef7ccdb69fe1576ce (patch) | |
tree | 6df1d3dc0c466193419b8a5530ebf77fc1d1e9d8 /query.c | |
parent | 812468916a676676ebd948bbc4a645f05f6e7c1f (diff) | |
download | rpm-db0e2d93fa8ce8f13fe2a10ef7ccdb69fe1576ce.tar.gz rpm-db0e2d93fa8ce8f13fe2a10ef7ccdb69fe1576ce.tar.bz2 rpm-db0e2d93fa8ce8f13fe2a10ef7ccdb69fe1576ce.zip |
added requiredby and provides querying
CVS patchset: 624
CVS date: 1996/06/09 21:47:42
Diffstat (limited to 'query.c')
-rw-r--r-- | query.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -531,6 +531,26 @@ int doQuery(char * prefix, enum querysources source, int queryFlags, } break; + case QUERY_PROVIDES: + if (rpmdbFindByProvides(db, arg, &matches)) { + fprintf(stderr, "no package provides %s\n", arg); + retcode = 1; + } else { + showMatches(db, matches, queryFlags, queryFormat); + freeDBIndexRecord(matches); + } + break; + + case QUERY_REQUIREDBY: + if (rpmdbFindByRequiredBy(db, arg, &matches)) { + fprintf(stderr, "no package requires %s\n", arg); + retcode = 1; + } else { + showMatches(db, matches, queryFlags, queryFormat); + freeDBIndexRecord(matches); + } + break; + case QUERY_SPATH: case QUERY_PATH: if (*arg != '/') { |