diff options
author | Guillem Jover <guillem@debian.org> | 2012-10-18 21:02:56 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2013-08-11 02:38:44 +0200 |
commit | 81cf72aeb0413cef87ac262b1b0baea4ddf6b545 (patch) | |
tree | 405aa60a1868a03b4990fb839bff967d2d72dad9 | |
parent | 425d915bbe9fd2e00e25afcf1b0e2a1a8f10b104 (diff) | |
download | dpkg-81cf72aeb0413cef87ac262b1b0baea4ddf6b545.tar.gz |
libdpkg: Fix field names on error messages
Either capitalize or rename them to match reality.
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | lib/dpkg/fields.c | 22 | ||||
-rw-r--r-- | lib/dpkg/parse.c | 4 |
3 files changed, 15 insertions, 13 deletions
diff --git a/debian/changelog b/debian/changelog index 7659b664b..5bee356d5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,8 @@ dpkg (1.17.2) UNRELEASED; urgency=low debian/control does not exist. Closes: #667008 * Pass the package reference count (i.e. number of present instances) to maintainer scripts via the new variable DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT. + * Fix field names on error messages in libdpkg, by either capitalizing them + or by renaming them to match reality. [ Updated programs translations ] * Vietnamese (Trần Ngọc Quân). diff --git a/lib/dpkg/fields.c b/lib/dpkg/fields.c index c595484e3..b0a13cff4 100644 --- a/lib/dpkg/fields.c +++ b/lib/dpkg/fields.c @@ -4,7 +4,7 @@ * * Copyright © 1995 Ian Jackson <ian@chiark.greenend.org.uk> * Copyright © 2001 Wichert Akkerman - * Copyright © 2006-2012 Guillem Jover <guillem@debian.org> + * Copyright © 2006-2013 Guillem Jover <guillem@debian.org> * Copyright © 2009 Canonical Ltd. * Copyright © 2011 Linaro Limited * Copyright © 2011 Raphaël Hertzog <hertzog@debian.org> @@ -205,7 +205,7 @@ f_priority(struct pkginfo *pkg, struct pkgbin *pkgbin, const char *value, const struct fieldinfo *fip) { if (!*value) return; - pkg->priority = parse_nv_last(ps, _("word in `priority' field"), + pkg->priority = parse_nv_last(ps, _("word in 'Priority' field"), priorityinfos, value); if (pkg->priority == pri_other) pkg->otherpriority = nfstrsave(value); @@ -218,15 +218,15 @@ f_status(struct pkginfo *pkg, struct pkgbin *pkgbin, { if (ps->flags & pdb_rejectstatus) parse_error(ps, - _("value for `status' field not allowed in this context")); + _("value for 'Status' field not allowed in this context")); if (ps->flags & pdb_recordavailable) return; - pkg->want = parse_nv_next(ps, _("first (want) word in `status' field"), + pkg->want = parse_nv_next(ps, _("first (want) word in 'Status' field"), wantinfos, &value); - pkg->eflag = parse_nv_next(ps, _("second (error) word in `status' field"), + pkg->eflag = parse_nv_next(ps, _("second (error) word in 'Status' field"), eflaginfos, &value); - pkg->status = parse_nv_last(ps, _("third (status) word in `status' field"), + pkg->status = parse_nv_last(ps, _("third (status) word in 'Status' field"), statusinfos, value); } @@ -266,7 +266,7 @@ f_configversion(struct pkginfo *pkg, struct pkgbin *pkgbin, { if (ps->flags & pdb_rejectstatus) parse_error(ps, - _("value for `config-version' field not allowed in this context")); + _("value for 'Config-Version' field not allowed in this context")); if (ps->flags & pdb_recordavailable) return; @@ -297,7 +297,7 @@ static void conffvalue_lastword(const char *value, const char *from, malformed: parse_error(ps, - _("value for `conffiles' has malformatted line `%.*s'"), + _("value for 'Conffiles' field has malformatted line '%.*s'"), (int)min(endent - value, 250), value); } @@ -319,7 +319,7 @@ f_conffiles(struct pkginfo *pkg, struct pkgbin *pkgbin, if (c == '\n') continue; if (c != ' ') parse_error(ps, - _("value for `conffiles' has line starting with non-space `%c'"), + _("value for 'Conffiles' has line starting with non-space '%c'"), c); for (endent = value; (c = *endent) != '\0' && c != '\n'; endent++) ; conffvalue_lastword(value, endent, endent, @@ -613,7 +613,7 @@ f_trigpend(struct pkginfo *pend, struct pkgbin *pkgbin, if (ps->flags & pdb_rejectstatus) parse_error(ps, - _("value for `triggers-pending' field not allowed in " + _("value for 'Triggers-Pending' field not allowed in " "this context")); while ((word = scan_word(&value))) { @@ -638,7 +638,7 @@ f_trigaw(struct pkginfo *aw, struct pkgbin *pkgbin, if (ps->flags & pdb_rejectstatus) parse_error(ps, - _("value for `triggers-awaited' field not allowed in " + _("value for 'Triggers-Awaited' field not allowed in " "this context")); while ((word = scan_word(&value))) { diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c index b51ca1b3d..38d77aee6 100644 --- a/lib/dpkg/parse.c +++ b/lib/dpkg/parse.c @@ -3,7 +3,7 @@ * parse.c - database file parsing, main package/field loop * * Copyright © 1995 Ian Jackson <ian@chiark.greenend.org.uk> - * Copyright © 2006,2008-2012 Guillem Jover <guillem@debian.org> + * Copyright © 2006,2008-2013 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 @@ -229,7 +229,7 @@ pkg_parse_verify(struct parsedb_state *ps, if (pkg->configversion.version) { if (pkg->status == stat_installed || pkg->status == stat_notinstalled) parse_error(ps, - _("Configured-Version for package with inappropriate Status")); + _("Config-Version for package with inappropriate Status")); } else { if (pkg->status == stat_installed) pkg->configversion = pkgbin->version; |