summaryrefslogtreecommitdiff
path: root/query.c
diff options
context:
space:
mode:
authorewt <devnull@localhost>1996-06-09 21:47:42 +0000
committerewt <devnull@localhost>1996-06-09 21:47:42 +0000
commitdb0e2d93fa8ce8f13fe2a10ef7ccdb69fe1576ce (patch)
tree6df1d3dc0c466193419b8a5530ebf77fc1d1e9d8 /query.c
parent812468916a676676ebd948bbc4a645f05f6e7c1f (diff)
downloadrpm-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.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/query.c b/query.c
index e980023c4..f5e43a84c 100644
--- a/query.c
+++ b/query.c
@@ -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 != '/') {