Sfoglia il codice sorgente

dpkg-buildpackage: check version validity early

error out early if the version number from the changelog
is not a valid Debian version.
Frank Lichtenheld 19 anni fa
parent
commit
5ccf37476a
3 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 5 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 1 0
      scripts/dpkg-buildpackage.pl

+ 5 - 0
ChangeLog

@@ -1,5 +1,10 @@
 2007-09-29  Frank Lichtenheld  <djpig@debian.org>
 
+	* scripts/dpkg-buildpackage.pl: Call checkversion()
+	on version extracted from changelog. Since other
+	program we call later will do the same there is
+	really no reason not to fail early.
+
 	* scripts/dpkg-buildpackage.pl (testcommand):
 	Make the check more sensible. Instead of testing
 	/usr/bin/$cmd, test `which $cmd`.

+ 2 - 0
debian/changelog

@@ -33,6 +33,8 @@ dpkg (1.14.7) UNRELEASED; urgency=low
   * Add --utf8-strings to gpg call in dpkg-buildpackage since
     that seems to be the better default. Suggested by Székelyi Szabolcs.
     Closes: #379418
+  * Let dpkg-buildpackage error out early if the version number from
+    the changelog is not a valid Debian version. Closes: #216075
 
   [ Updated dpkg translations ]
   * Basque (Piarres Beobide). Closes: #440859

+ 1 - 0
scripts/dpkg-buildpackage.pl

@@ -260,6 +260,7 @@ sub mustsetvar {
 
 my $pkg = mustsetvar($changes{source}, _g('source package'));
 my $version = mustsetvar($changes{version}, _g('source version'));
+checkversion($version);
 
 my $maintainer;
 if ($changedby) {