summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/dpkg/pkg-format.c4
-rw-r--r--lib/dpkg/pkg-show.c6
-rw-r--r--lib/dpkg/pkg-show.h5
-rw-r--r--src/enquiry.c3
-rw-r--r--src/querycmd.c6
5 files changed, 13 insertions, 11 deletions
diff --git a/lib/dpkg/pkg-format.c b/lib/dpkg/pkg-format.c
index 54fab37f9..fc1078e3d 100644
--- a/lib/dpkg/pkg-format.c
+++ b/lib/dpkg/pkg-format.c
@@ -3,7 +3,7 @@
* pkg-format.c - customizable package formatting
*
* Copyright © 2001 Wichert Akkerman <wakkerma@debian.org>
- * Copyright © 2008-2011 Guillem Jover <guillem@debian.org>
+ * Copyright © 2008-2012 Guillem Jover <guillem@debian.org>
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -231,7 +231,7 @@ virt_summary(struct varbuf *vb,
const char *desc;
int len;
- desc = pkg_summary(pkg, &len);
+ desc = pkg_summary(pkg, pkgbin, &len);
varbuf_add_buf(vb, desc, len);
}
diff --git a/lib/dpkg/pkg-show.c b/lib/dpkg/pkg-show.c
index d9c4778b8..919eb0611 100644
--- a/lib/dpkg/pkg-show.c
+++ b/lib/dpkg/pkg-show.c
@@ -3,7 +3,7 @@
* pkg-show.c - primitives for pkg information display
*
* Copyright © 1995,1996 Ian Jackson <ian@chiark.greenend.org.uk>
- * Copyright © 2008-2011 Guillem Jover <guillem@debian.org>
+ * Copyright © 2008-2012 Guillem Jover <guillem@debian.org>
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -131,12 +131,12 @@ pkg_name(struct pkginfo *pkg, enum pkg_name_arch_when pnaw)
}
const char *
-pkg_summary(const struct pkginfo *pkg, int *len_ret)
+pkg_summary(const struct pkginfo *pkg, const struct pkgbin *pkgbin, int *len_ret)
{
const char *pdesc;
size_t len;
- pdesc = pkg->installed.description;
+ pdesc = pkgbin->description;
if (!pdesc)
pdesc = _("(no description available)");
diff --git a/lib/dpkg/pkg-show.h b/lib/dpkg/pkg-show.h
index 980ff5d62..057bf4bbc 100644
--- a/lib/dpkg/pkg-show.h
+++ b/lib/dpkg/pkg-show.h
@@ -2,7 +2,7 @@
* libdpkg - Debian packaging suite library routines
* pkg-show.h - primitives for pkg information display
*
- * Copyright © 2010-2011 Guillem Jover <guillem@debian.org>
+ * Copyright © 2010-2012 Guillem Jover <guillem@debian.org>
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,7 +26,8 @@
DPKG_BEGIN_DECLS
-const char *pkg_summary(const struct pkginfo *pkg, int *len_ret);
+const char *pkg_summary(const struct pkginfo *pkg, const struct pkgbin *pkgbin,
+ int *len_ret);
int pkg_abbrev_want(const struct pkginfo *pkg);
int pkg_abbrev_status(const struct pkginfo *pkg);
int pkg_abbrev_eflag(const struct pkginfo *pkg);
diff --git a/src/enquiry.c b/src/enquiry.c
index c90689e14..265d77b8c 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -3,6 +3,7 @@
* enquiry.c - status enquiry and listing options
*
* Copyright © 1995,1996 Ian Jackson <ian@chiark.greenend.org.uk>
+ * Copyright © 2006,2008-2012 Guillem Jover <guillem@debian.org>
* Copyright © 2011 Linaro Limited
* Copyright © 2011 Raphaël Hertzog <hertzog@debian.org>
*
@@ -147,7 +148,7 @@ static void describebriefly(struct pkginfo *pkg) {
l= strlen(pkg->set->name);
if (l>20) maxl -= (l-20);
- pdesc = pkg_summary(pkg, &l);
+ pdesc = pkg_summary(pkg, &pkg->installed, &l);
l = min(l, maxl);
printf(" %-20s %.*s\n", pkg->set->name, l, pdesc);
diff --git a/src/querycmd.c b/src/querycmd.c
index 94d56284a..1d169c6f7 100644
--- a/src/querycmd.c
+++ b/src/querycmd.c
@@ -4,7 +4,7 @@
*
* Copyright © 1995,1996 Ian Jackson <ian@chiark.greenend.org.uk>
* Copyright © 2000,2001 Wichert Akkerman <wakkerma@debian.org>
- * Copyright © 2006-2011 Guillem Jover <guillem@debian.org>
+ * Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -105,7 +105,7 @@ list_format_init(struct list_format *fmt, struct pkg_array *array)
plen = strlen(array->pkgs[i]->set->name);
vlen = strlen(versiondescribe(&array->pkgs[i]->installed.version,
vdew_nonambig));
- pkg_summary(array->pkgs[i], &dlen);
+ pkg_summary(array->pkgs[i], &array->pkgs[i]->installed, &dlen);
if (plen > fmt->nw)
fmt->nw = plen;
@@ -183,7 +183,7 @@ list1package(struct pkginfo *pkg, struct list_format *fmt, struct pkg_array *arr
list_format_init(fmt, array);
list_format_print_header(fmt);
- pdesc = pkg_summary(pkg, &l);
+ pdesc = pkg_summary(pkg, &pkg->installed, &l);
l = min(l, fmt->dw);
printf(fmt->format,