From: Frank Lichtenheld Date: Sat, 29 Sep 2007 14:45:24 +0000 (+0200) Subject: dpkg-buildpackage: check version validity early X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ccf37476af8770e152d5c7f630984f8b39403e2;p=dpkg dpkg-buildpackage: check version validity early error out early if the version number from the changelog is not a valid Debian version. --- diff --git a/ChangeLog b/ChangeLog index 6fa71cc0..b1eafabe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-09-29 Frank Lichtenheld + * 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`. diff --git a/debian/changelog b/debian/changelog index c18f59d0..6c33f1cb 100644 --- a/debian/changelog +++ b/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 diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl index 1387cab8..f34a8c6e 100644 --- a/scripts/dpkg-buildpackage.pl +++ b/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) {