- added :hex query format
authorjbj <devnull@localhost>
Sun, 16 Aug 1998 14:06:19 +0000 (14:06 +0000)
committerjbj <devnull@localhost>
Sun, 16 Aug 1998 14:06:19 +0000 (14:06 +0000)
- fixed --querytags to display virtual tags

CVS patchset: 2252
CVS date: 1998/08/16 14:06:19

CHANGES
query.c

diff --git a/CHANGES b/CHANGES
index 3c3043d..94d2ee7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -33,6 +33,8 @@
        - do a better job of checking for a spec file in tarballs
          (Pavel Roskin)
        - fixed --triggers alias (Michael Andres)
+       - added :hex query format
+       - fixed --querytags to display virtual tags
 
 2.5.1 -> 2.5.2:
        - added -bs to build just a source package
diff --git a/query.c b/query.c
index 7d9233d..f3873c2 100644 (file)
--- a/query.c
+++ b/query.c
@@ -534,8 +534,18 @@ int doQuery(char * prefix, enum querysources source, int queryFlags,
 void queryPrintTags(void) {
     const struct headerTagTableEntry * t;
     int i;
+    struct headerSprintfExtension * ext = rpmHeaderFormats;
 
     for (i = 0, t = rpmTagTable; i < rpmTagTableSize; i++, t++) {
        printf("%s\n", t->name + 7);
     }
+
+    while (ext->name) {
+       if (ext->type == HEADER_EXT_TAG)
+           printf("%s\n", ext->name + 7), ext++;
+       else if (ext->type == HEADER_EXT_MORE)
+           ext = ext->u.more;
+       else
+           ext++;
+    }
 }