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=578df67043f8beff11cbaa119003031184e163ac commit 578df67043f8beff11cbaa119003031184e163ac Author: Guillem Jover <[email protected]> AuthorDate: Sat Feb 23 04:55:47 2019 +0100 libdpkg: Move status names from parse errors to arguments Although package states are very unlikely to change their names, it's just better to use a single canonical place to store their values. This also makes sure no translator will accidentally translate these names. --- debian/changelog | 1 + lib/dpkg/parse.c | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 39aaa0e68..ad55eea6f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,6 +47,7 @@ dpkg (1.19.5) UNRELEASED; urgency=medium - libdpkg: New benchmark programs and infrastructure. - libdpkg: Add new dpkg_error_move() function. - libdpkg: Add new dpkg_has_error() function. + - libdpkg: Move status names from parse errors to arguments. * Build system: - Check whether this dist is a release, based only on the version format. This will avoid having to do a two staged release to get a proper perl diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c index 8d1195694..b5e38dd14 100644 --- a/lib/dpkg/parse.c +++ b/lib/dpkg/parse.c @@ -257,7 +257,8 @@ pkg_parse_verify(struct parsedb_state *ps, pkg_status_name(pkg)); else if (pkg->status == PKG_STAT_TRIGGERSAWAITED && !pkg->trigaw.head) parse_error(ps, - _("package has status triggers-awaited but no triggers awaited")); + _("package has status %s but no triggers awaited"), + pkg_status_name(pkg)); if (pkg->trigpend_head && !(pkg->status == PKG_STAT_TRIGGERSPENDING || @@ -267,8 +268,8 @@ pkg_parse_verify(struct parsedb_state *ps, pkg_status_name(pkg)); else if (pkg->status == PKG_STAT_TRIGGERSPENDING && !pkg->trigpend_head) parse_error(ps, - _("package has status triggers-pending but no triggers " - "pending")); + _("package has status %s but no triggers pending"), + pkg_status_name(pkg)); /* FIXME: There was a bug that could make a not-installed package have * conffiles, so we check for them here and remove them (rather than @@ -277,8 +278,8 @@ pkg_parse_verify(struct parsedb_state *ps, pkg->status == PKG_STAT_NOTINSTALLED && pkgbin->conffiles) { parse_warn(ps, - _("Package which in state not-installed has conffiles, " - "forgetting them")); + _("package has status %s and has conffiles, forgetting them"), + pkg_status_name(pkg)); pkgbin->conffiles = NULL; } -- Dpkg.Org's dpkg

