The following commit has been merged in the master branch:
commit eadbeb543aa212386899c9d992f5a5e25bd3ba08
Author: Guillem Jover <guil...@debian.org>
Date:   Wed Nov 9 17:43:35 2011 +0100

    libdpkg: Add new virtual fields support in package format show

diff --git a/lib/dpkg/pkg-format.c b/lib/dpkg/pkg-format.c
index f4ab20f..d43e3cf 100644
--- a/lib/dpkg/pkg-format.c
+++ b/lib/dpkg/pkg-format.c
@@ -201,6 +201,10 @@ pkg_format_parse(const char *fmt)
        return head;
 }
 
+const struct fieldinfo virtinfos[] = {
+       { NULL },
+};
+
 static const struct fieldinfo *
 find_field_info(const struct fieldinfo *fields_head,
                 const struct pkg_format_node *fmt_node)
@@ -240,6 +244,9 @@ pkg_format_show(const struct pkg_format_node *head,
 
                        fip = find_field_info(fieldinfos, head);
 
+                       if (fip->name == NULL)
+                               fip = find_field_info(virtinfos, head);
+
                        if (fip->name) {
                                fip->wcall(&wb, pkg, pif, 0, fip);
 

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to