Parcourir la source

dpkg-deb: Change conffile name length warning into an error

Such packages will not be accepted by dpkg at install time anyway, so
catch this early on, and don't let it through.
Guillem Jover il y a 12 ans
Parent
commit
a363181bda
2 fichiers modifiés avec 5 ajouts et 9 suppressions
  1. 2 0
      debian/changelog
  2. 3 9
      dpkg-deb/build.c

+ 2 - 0
debian/changelog

@@ -10,6 +10,8 @@ dpkg (1.17.6) UNRELEASED; urgency=low
   * Detect a missing sign-command in dpkg-buildpackage, before starting the
     build, to avoid a failure at the end of the process.
   * 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.
 
   [ Updated scripts translations ]
   * German (Helge Kreutzmann).

+ 3 - 9
dpkg-deb/build.c

@@ -295,15 +295,9 @@ check_conffiles(const char *dir)
     if (!n)
       ohshite(_("empty string from fgets reading conffiles"));
 
-    if (conffilename[n - 1] != '\n') {
-      int c;
-
-      warning(_("conffile name '%.50s...' is too long, or missing final newline"),
-              conffilename);
-      while ((c = getc(cf)) != EOF && c != '\n');
-
-      continue;
-    }
+    if (conffilename[n - 1] != '\n')
+      ohshit(_("conffile name '%.50s...' is too long, or missing final newline"),
+             conffilename);
 
     conffilename[n - 1] = '\0';
     varbuf_reset(&controlfile);