The following commit has been merged in the master branch:
commit 4def4665267a8249ae2de2594422c18f7a84bc8b
Author: Guillem Jover <guil...@debian.org>
Date:   Fri Jul 16 16:35:03 2010 +0200

    dpkg-query: Use pkg_summary in list1package instead of ad-hoc code

diff --git a/src/query.c b/src/query.c
index 0607935..609e24c 100644
--- a/src/query.c
+++ b/src/query.c
@@ -86,16 +86,13 @@ list1package(struct pkginfo *pkg, bool *head, struct 
pkg_array *array)
     if (w == -1) {
       nw=14, vw=14, dw=44;
       for (i = 0; i < array->n_pkgs; i++) {
-       const char *pdesc;
        int plen, vlen, dlen;
 
-       pdesc = pkg->installed.description;
-       if (!pdesc) pdesc= _("(no description available)");
-
        plen = strlen(array->pkgs[i]->name);
        vlen = strlen(versiondescribe(&array->pkgs[i]->installed.version,
                                      vdew_nonambig));
-       dlen= strcspn(pdesc, "\n");
+       pkg_summary(pkg, &dlen);
+
        if (plen > nw) nw = plen;
        if (vlen > vw) vw = vlen;
        if (dlen > dw) dw = dlen;

-- 
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