This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=6e5bd738efef1a0de4268ad12d87c27dfe91a687 commit 6e5bd738efef1a0de4268ad12d87c27dfe91a687 Author: Guillem Jover <[email protected]> AuthorDate: Sat May 26 05:29:30 2018 +0200 Use Synopsis instead of Summary for the short Description This unifies the term with the rest of the codebase, and makes it more descriptive. --- debian/changelog | 3 +++ lib/dpkg/libdpkg.map | 2 +- lib/dpkg/pkg-format.c | 11 ++++++----- lib/dpkg/pkg-show.c | 8 ++++---- lib/dpkg/pkg-show.h | 4 ++-- man/dpkg-query.man | 5 ++++- src/enquiry.c | 2 +- src/querycmd.c | 4 ++-- 8 files changed, 23 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2ceefc850..bd72840b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -73,6 +73,9 @@ dpkg (1.19.1) UNRELEASED; urgency=medium Reported by Johannes Schauer <[email protected]>. * Track package status dirtiness in dpkg to only log and report in status-fd when it has changed, removing duplication in output. Closes: #365921 + * Use Synopsis instead of Summary for the short Description, to unify the + nomenclature and to make it more descriptive. Add a new binary:Synopsis + virtual field to dpkg-query show format. * Architecture support: - Add support for riscv64 CPU. Closes: #822914 Thanks to Manuel A. Fernandez Montecelo <[email protected]> diff --git a/lib/dpkg/libdpkg.map b/lib/dpkg/libdpkg.map index 6f9b53e01..2c4c11181 100644 --- a/lib/dpkg/libdpkg.map +++ b/lib/dpkg/libdpkg.map @@ -280,7 +280,7 @@ LIBDPKG_PRIVATE { pkgbin_name; pkg_name; pkg_source_version; - pkgbin_summary; + pkgbin_synopsis; pkg_abbrev_want; pkg_abbrev_status; pkg_abbrev_eflag; diff --git a/lib/dpkg/pkg-format.c b/lib/dpkg/pkg-format.c index 40344a829..50c8bc581 100644 --- a/lib/dpkg/pkg-format.c +++ b/lib/dpkg/pkg-format.c @@ -269,14 +269,14 @@ virt_status_eflag(struct varbuf *vb, } static void -virt_summary(struct varbuf *vb, - const struct pkginfo *pkg, const struct pkgbin *pkgbin, - enum fwriteflags flags, const struct fieldinfo *fip) +virt_synopsis(struct varbuf *vb, + const struct pkginfo *pkg, const struct pkgbin *pkgbin, + enum fwriteflags flags, const struct fieldinfo *fip) { const char *desc; int len; - desc = pkgbin_summary(pkg, pkgbin, &len); + desc = pkgbin_synopsis(pkg, pkgbin, &len); varbuf_add_buf(vb, desc, len); } @@ -321,7 +321,8 @@ virt_source_upstream_version(struct varbuf *vb, static const struct fieldinfo virtinfos[] = { { FIELD("binary:Package"), NULL, virt_package }, - { FIELD("binary:Summary"), NULL, virt_summary }, + { FIELD("binary:Synopsis"), NULL, virt_synopsis }, + { FIELD("binary:Summary"), NULL, virt_synopsis }, { FIELD("db:Status-Abbrev"), NULL, virt_status_abbrev }, { FIELD("db:Status-Want"), NULL, virt_status_want }, { FIELD("db:Status-Status"), NULL, virt_status_status }, diff --git a/lib/dpkg/pkg-show.c b/lib/dpkg/pkg-show.c index 4818675bb..479e7090b 100644 --- a/lib/dpkg/pkg-show.c +++ b/lib/dpkg/pkg-show.c @@ -119,22 +119,22 @@ pkg_name(const struct pkginfo *pkg, enum pkg_name_arch_when pnaw) } /** - * Return a string representation of the package summary. + * Return a string representation of the package synopsis. * * The returned string must not be freed, and it's permanently allocated so * can be used as long as the non-freeing memory pool has not been freed. * - * The package summary is the short description, but it is not NUL terminated, + * The package synopsis is the short description, but it is not NUL terminated, * so the output len argument should be used to limit the string length. * * @param pkg The package to consider. * @param pkgbin The binary package instance to consider. - * @param[out] len The length of the summary string within the description. + * @param[out] len The length of the synopsis string within the description. * * @return The string representation. */ const char * -pkgbin_summary(const struct pkginfo *pkg, const struct pkgbin *pkgbin, int *len) +pkgbin_synopsis(const struct pkginfo *pkg, const struct pkgbin *pkgbin, int *len) { const char *pdesc; diff --git a/lib/dpkg/pkg-show.h b/lib/dpkg/pkg-show.h index dd8f666e6..9ef0ed459 100644 --- a/lib/dpkg/pkg-show.h +++ b/lib/dpkg/pkg-show.h @@ -34,8 +34,8 @@ DPKG_BEGIN_DECLS int pkg_sorter_by_nonambig_name_arch(const void *a, const void *b); -const char *pkgbin_summary(const struct pkginfo *pkg, - const struct pkgbin *pkgbin, int *len_ret); +const char *pkgbin_synopsis(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/man/dpkg-query.man b/man/dpkg-query.man index 7e02cc5d7..46cf7c28c 100644 --- a/man/dpkg-query.man +++ b/man/dpkg-query.man @@ -249,8 +249,11 @@ An architecture qualifier will be present to make the package name unambiguous, for example if the package has a \fBMulti\-Arch\fP field with a value of \fBsame\fP or the package is of a foreign architecture. .TP +.B binary:Synopsis +It contains the package short description (since dpkg 1.19.1). +.TP .B binary:Summary -It contains the package short description (since dpkg 1.16.2). +This is an alias for \fBbinary:Synopsis\fP (since dpkg 1.16.2). .TP .B db:Status\-Abbrev It contains the abbreviated package status (as three characters), diff --git a/src/enquiry.c b/src/enquiry.c index 6182fce7f..e309f5516 100644 --- a/src/enquiry.c +++ b/src/enquiry.c @@ -169,7 +169,7 @@ static void describebriefly(struct pkginfo *pkg) { l= strlen(pkg->set->name); if (l>20) maxl -= (l-20); - pdesc = pkgbin_summary(pkg, &pkg->installed, &l); + pdesc = pkgbin_synopsis(pkg, &pkg->installed, &l); l = min(l, maxl); printf(" %-20s %.*s\n", pkg_name(pkg, pnaw_nonambig), l, pdesc); diff --git a/src/querycmd.c b/src/querycmd.c index 67b84b20a..2fd1b7827 100644 --- a/src/querycmd.c +++ b/src/querycmd.c @@ -179,7 +179,7 @@ list_format_init(struct list_format *fmt, struct pkg_array *array) vlen = str_width(versiondescribe(&array->pkgs[i]->installed.version, vdew_nonambig)); alen = str_width(dpkg_arch_describe(array->pkgs[i]->installed.arch)); - pkgbin_summary(array->pkgs[i], &array->pkgs[i]->installed, &dlen); + pkgbin_synopsis(array->pkgs[i], &array->pkgs[i]->installed, &dlen); if (plen > fmt->nw) fmt->nw = plen; @@ -285,7 +285,7 @@ pkg_array_list_item(struct pkg_array *array, struct pkginfo *pkg, void *pkg_data list_format_init(fmt, array); list_format_print_header(fmt); - pdesc = pkgbin_summary(pkg, &pkg->installed, &l); + pdesc = pkgbin_synopsis(pkg, &pkg->installed, &l); l = min(l, fmt->dw); list_format_print(fmt, -- Dpkg.Org's dpkg

