Bläddra i källkod

dpkg-deb, dpkg: Unify and clarify conffile name length error message

Clarify the error message, by stating it's either too long or missing a
final newline, and unify it to be the same on both dpkg-deb and dpkg.

Closes: #108196
Guillem Jover 12 år sedan
förälder
incheckning
4ab4758e01
3 ändrade filer med 5 tillägg och 3 borttagningar
  1. 2 0
      debian/changelog
  2. 1 1
      dpkg-deb/build.c
  3. 2 2
      src/unpack.c

+ 2 - 0
debian/changelog

@@ -12,6 +12,8 @@ dpkg (1.17.6) UNRELEASED; urgency=low
   * Remove trailing newlines from dpkg-deb warning message.
   * Change dpkg-deb conffile name length warning into an error, as dpkg will
     reject those packages at install time anyway.
+  * Unify and clarify dpkg-deb and dpkg conffile name length error message.
+    Closes: #108196
 
   [ Updated scripts translations ]
   * German (Helge Kreutzmann).

+ 1 - 1
dpkg-deb/build.c

@@ -296,7 +296,7 @@ check_conffiles(const char *dir)
       ohshite(_("empty string from fgets reading conffiles"));
 
     if (conffilename[n - 1] != '\n')
-      ohshit(_("conffile name '%.50s...' is too long, or missing final newline"),
+      ohshit(_("conffile name '%s' is too long, or missing final newline"),
              conffilename);
 
     conffilename[n - 1] = '\0';

+ 2 - 2
src/unpack.c

@@ -629,8 +629,8 @@ void process_archive(const char *filename) {
       p= conffilenamebuf + strlen(conffilenamebuf);
       assert(p != conffilenamebuf);
       if (p[-1] != '\n')
-        ohshit(_("name of conffile (starting `%.250s') is too long (>%d characters)"),
-               conffilenamebuf, MAXCONFFILENAME);
+        ohshit(_("conffile name '%s' is too long, or missing final newline"),
+               conffilenamebuf);
       while (p > conffilenamebuf && isspace(p[-1])) --p;
       if (p == conffilenamebuf) continue;
       *p = '\0';