diff options
author | Raphaƫl Hertzog <hertzog@debian.org> | 2011-02-22 17:20:30 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2012-03-14 07:13:25 +0100 |
commit | 9269cfc8829f11914ea324d11dc96e8058dd1b2f (patch) | |
tree | 7f3b2a6a601569fcde05c4dfb79cfdcbb434e1e0 /src/enquiry.c | |
parent | ee7131abcd7558158d03f5d2761d9e580161e43a (diff) | |
download | dpkg-9269cfc8829f11914ea324d11dc96e8058dd1b2f.tar.gz |
dpkg: Update output commands to print package specifiers
This affects --audit, --yet-to-unpack and --get-selections.
Sponsored-by: Linaro Limited
[guillem@debian.org:
- Adapt to new pkg_name API.
- Only arch-qualify when unambiguous. ]
Signed-off-by: Guillem Jover <guillem@debian.org>
Diffstat (limited to 'src/enquiry.c')
-rw-r--r-- | src/enquiry.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/enquiry.c b/src/enquiry.c index 0d5e560f5..914f898b9 100644 --- a/src/enquiry.c +++ b/src/enquiry.c @@ -151,7 +151,7 @@ static void describebriefly(struct pkginfo *pkg) { pdesc = pkg_summary(pkg, &pkg->installed, &l); l = min(l, maxl); - printf(" %-20s %.*s\n", pkg->set->name, l, pdesc); + printf(" %-20s %.*s\n", pkg_name(pkg, pnaw_nonambig), l, pdesc); } int @@ -280,12 +280,15 @@ unpackchk(const char *const *argv) while (width > 59) { putchar(' '); width--; } it = pkg_db_iter_new(); while ((pkg = pkg_db_iter_next_pkg(it))) { + const char *pkgname; + if (!yettobeunpacked(pkg,&thissect)) continue; if (strcasecmp(thissect,se->name)) continue; - width -= strlen(pkg->set->name); + pkgname = pkg_name(pkg, pnaw_nonambig); + width -= strlen(pkgname); width--; if (width < 4) { printf(" ..."); break; } - printf(" %s", pkg->set->name); + printf(" %s", pkgname); } pkg_db_iter_free(it); putchar('\n'); |