summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewt <devnull@localhost>1996-03-29 19:39:41 +0000
committerewt <devnull@localhost>1996-03-29 19:39:41 +0000
commit29269c7429a9ff2dea3e5981023eca5bf83a0701 (patch)
treeb1f4e5bf9e05e9c10d3c9e21434848b5dc2433a4
parent96e602e3bae05e1fdea172a2396730463fb4accf (diff)
downloadrpm-29269c7429a9ff2dea3e5981023eca5bf83a0701.tar.gz
rpm-29269c7429a9ff2dea3e5981023eca5bf83a0701.tar.bz2
rpm-29269c7429a9ff2dea3e5981023eca5bf83a0701.zip
refuses to query old format source packages
CVS patchset: 498 CVS date: 1996/03/29 19:39:41
-rw-r--r--query.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/query.c b/query.c
index 5d523977e..676f0b52e 100644
--- a/query.c
+++ b/query.c
@@ -337,12 +337,18 @@ void doQuery(char * prefix, enum querysources source, int queryFlags,
close(fd);
switch (rc) {
case 0:
- printHeader(h, queryFlags);
- freeHeader(h);
+ if (!h) {
+ fprintf(stderr, "old format source packages cannot be "
+ "queried\n");
+ } else {
+ printHeader(h, queryFlags);
+ freeHeader(h);
+ }
break;
case 1:
fprintf(stderr, "%s is not an RPM\n", arg);
}
+
}
break;