[devscripts] 01/01: uscan: Use Dpkg::Version to perform version comparisons

Osamu Aoki osamu at debian.org
Wed Jul 5 15:36:01 UTC 2017


Hi,

On Tue, Jul 04, 2017 at 05:36:26PM +0000, James McCoy wrote:
>     uscan: Use Dpkg::Version to perform version comparisons
>     
>     Since the versions we're comparing are known to be irregular (i.e.,
>     upstream rather than Debian) versions, disabling the strict checks on
>     version format.  This silences the "bad syntax" error that dpkg was
>     emitting.

Very elegant solution.  Step in right direction.  Thanks.

But I winder silencing all errors are good or not.

> +    my $mangled_ver = Dpkg::Version->new("1:${mangled_lastversion}-0", check => 0);
> +    my $upstream_ver = Dpkg::Version->new("1:${newversion}-0", check => 0);

Why "check => 0".  Why not set "check => 1" and test the resulting
$mangled_ver and $upstream_ver.  If any of these are undefined, let's
emit message before moving on.  Otherwise the bad "bad syntax" error and
similar bugs caused by bad watch file regex are difficult to catch.

Am I missing something here?

Osamu



More information about the devscripts-devel mailing list