summaryrefslogtreecommitdiff
path: root/query.c
diff options
context:
space:
mode:
authorewt <devnull@localhost>1996-07-14 16:14:39 +0000
committerewt <devnull@localhost>1996-07-14 16:14:39 +0000
commit373acfe46bf8fa1c87c851e2ea11fca6ce283f57 (patch)
tree713a937e2bd6d914fc2146493999cc5075d6ad88 /query.c
parentb67317e599105b4fe45fde2ec77c3c7730bcbcc2 (diff)
downloadrpm-373acfe46bf8fa1c87c851e2ea11fca6ce283f57.tar.gz
rpm-373acfe46bf8fa1c87c851e2ea11fca6ce283f57.tar.bz2
rpm-373acfe46bf8fa1c87c851e2ea11fca6ce283f57.zip
1) added Summary to -qi output
2) made --requires and --provides not print (none) if the tags aren't present CVS patchset: 820 CVS date: 1996/07/14 16:14:39
Diffstat (limited to 'query.c')
-rw-r--r--query.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/query.c b/query.c
index 1d6b37e19..451fcbabd 100644
--- a/query.c
+++ b/query.c
@@ -38,7 +38,8 @@ static char * defaultQueryFormat =
"Install date: %-27{INSTALLTIME:date} Build Host: %{BUILDHOST}\n"
"Group : %-27{GROUP} Source RPM: %{SOURCERPM}\n"
"Size : %{SIZE}\n"
- "Description : %{DESCRIPTION}\n";
+ "Summary : %{SUMMARY}\n"
+ "Description :\n%{DESCRIPTION}\n";
static char * requiresQueryFormat =
"[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]";
static char * providesQueryFormat = "[%{PROVIDES}\n]";
@@ -344,11 +345,13 @@ static void printHeader(Header h, int queryFlags, char * queryFormat) {
}
if (queryFlags & QUERY_FOR_PROVIDES) {
- queryHeader(h, providesQueryFormat);
+ if (isEntry(h, RPMTAG_PROVIDES))
+ queryHeader(h, providesQueryFormat);
}
if (queryFlags & QUERY_FOR_REQUIRES) {
- queryHeader(h, requiresQueryFormat);
+ if (isEntry(h, RPMTAG_REQUIREFLAGS))
+ queryHeader(h, requiresQueryFormat);
}
if (queryFlags & QUERY_FOR_LIST) {