diff options
author | Guillem Jover <guillem@debian.org> | 2009-02-10 03:10:17 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2009-02-11 03:39:45 +0200 |
commit | 7efb708a1f3f645ad102de9c64a0ab7d7ac925a9 (patch) | |
tree | eb126a98827815fe9400b0499e967726610d9f26 | |
parent | ad0596aaa56277e08efe764373001f4525dd5726 (diff) | |
download | dpkg-7efb708a1f3f645ad102de9c64a0ab7d7ac925a9.tar.gz |
dpkg: Print correct feature name on --assert-* failures
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | src/enquiry.c | 19 |
3 files changed, 18 insertions, 8 deletions
@@ -1,5 +1,11 @@ 2009-02-10 Guillem Jover <guillem@debian.org> + * src/enquiry.c (assert_version_support): Add new feature_name + argument, and use it when printing the output messages. Fix all + callers. + +2009-02-10 Guillem Jover <guillem@debian.org> + * src/enquiry.c (assert_version_support): Remove reqversion argument. Do not initialize verrev_buf from reqversion, when the epoch is ~0UL. (assertpredep): Pass a fully constructed versionrevision to diff --git a/debian/changelog b/debian/changelog index 66eb40afb..41bb0c651 100644 --- a/debian/changelog +++ b/debian/changelog @@ -59,6 +59,7 @@ dpkg (1.15.0) UNRELEASED; urgency=low * Add kopensolaris support to ostable and triplettable. Closes: #509312 * Document in deb.5 in detail the currently supported format, ar member names, types of tar archives and data.tar members. + * Print correct feature name on «dpkg --assert-*» failures. [ Raphael Hertzog ] * Enhance dpkg-shlibdeps's error message when a library can't be found to diff --git a/src/enquiry.c b/src/enquiry.c index 17bbc18e4..7840748ee 100644 --- a/src/enquiry.c +++ b/src/enquiry.c @@ -239,7 +239,8 @@ void unpackchk(const char *const *argv) { static void assert_version_support(const char *const *argv, - struct versionrevision *verrev_buf) + struct versionrevision *verrev_buf, + const char *feature_name) { struct pkginfo *pkg; @@ -257,33 +258,35 @@ assert_version_support(const char *const *argv, case stat_triggersawaited: if (versionsatisfied3(&pkg->configversion,verrev_buf,dvr_laterequal)) break; - printf(_("Version of dpkg with working epoch support not yet configured.\n" - " Please use `dpkg --configure dpkg', and then try again.\n")); + printf(_("Version of dpkg with working %s support not yet configured.\n" + " Please use 'dpkg --configure dpkg', and then try again.\n"), + feature_name); exit(1); default: - printf(_("dpkg not recorded as installed, cannot check for epoch support !\n")); + printf(_("dpkg not recorded as installed, cannot check for %s support!\n"), + feature_name); exit(1); } } void assertpredep(const char *const *argv) { struct versionrevision version = { 0, "1.1.0", NULL }; - assert_version_support(argv, &version); + assert_version_support(argv, &version, _("Pre-Depends field")); } void assertepoch(const char *const *argv) { struct versionrevision version = { 0, "1.4.0.7", NULL }; - assert_version_support(argv, &version); + assert_version_support(argv, &version, _("epoch")); } void assertlongfilenames(const char *const *argv) { struct versionrevision version = { 0, "1.4.1.17", NULL }; - assert_version_support(argv, &version); + assert_version_support(argv, &version, _("long filenames")); } void assertmulticonrep(const char *const *argv) { struct versionrevision version = { 0, "1.4.1.19", NULL }; - assert_version_support(argv, &version); + assert_version_support(argv, &version, _("multiple Conflicts and Replaces")); } void predeppackage(const char *const *argv) { |