Explorar o código

dpkg-source: Error out on obsolete Build-Profiles syntax

Switch the warning into an error, and stop doing the backward
compatibility mapping now that only doxygen is using the obsolete
syntax.
Guillem Jover %!s(int64=11) %!d(string=hai) anos
pai
achega
f22d73c3d2
Modificáronse 2 ficheiros con 4 adicións e 8 borrados
  1. 1 0
      debian/changelog
  2. 3 8
      scripts/dpkg-source.pl

+ 1 - 0
debian/changelog

@@ -3,6 +3,7 @@ dpkg (1.17.21) UNRELEASED; urgency=low
   [ Guillem Jover ]
   * Get consistent git-style diff support, by adding (>= 2.7) to the dpkg-dev
     patch Depends, and a Breaks patch (<< 2.7) to libdpkg-perl.
+  * Error out on obsolete Build-Profiles field syntax.
 
   [ Updated programs translations ]
   * Catalan (Guillem Jover).

+ 3 - 8
scripts/dpkg-source.pl

@@ -279,15 +279,10 @@ if ($options{opmode} =~ /^(build|print-format|(before|after)-build|commit)$/) {
 
         if (defined $profile) {
             # If the string does not contain brackets then it is using the
-            # old syntax (glibc, file, dbus and doxygen are affected).
-            # Thus we convert the old syntax to the new one. This conversion
-            # can be dropped once the old syntax is not in the archive anymore.
-            # <http://codesearch.debian.net/search?q=Build-Profiles%3A\s%2B[^<]+path%3Adebian%2Fcontrol>
+            # old syntax. Emit a fatal error.
             if ($profile !~ m/^\s*<.*>\s*$/) {
-                # Issue an ephemereal non-translatable warning.
-                warning('binary package stanza %s is using an obsolete ' .
-                        'Build-Profiles syntax', $p);
-                $profile =~ s/([!a-z0-9]+)/<$1>/g;
+                error(_g('binary package stanza %s is using an obsolete ' .
+                         'Build-Profiles field syntax'), $p);
             }
 
             # Instead of splitting twice and then joining twice, we just do