From 373acfe46bf8fa1c87c851e2ea11fca6ce283f57 Mon Sep 17 00:00:00 2001 From: ewt Date: Sun, 14 Jul 1996 16:14:39 +0000 Subject: [PATCH] 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 --- query.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/query.c b/query.c index 1d6b37e..451fcba 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) { -- 2.7.4