From: Hilko Bengen Date: Wed, 30 Mar 2011 19:48:20 +0000 (+0200) Subject: Newer versions of Dpkg::Version export version_compare instead of vercmp. X-Git-Url: https://git.donarmstrong.com/?p=wannabuild.git;a=commitdiff_plain;h=53d790e962438849e04d9c9e0169d03253fc8bef Newer versions of Dpkg::Version export version_compare instead of vercmp. --- diff --git a/bin/wanna-build b/bin/wanna-build index fa13874..8787c71 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -52,7 +52,13 @@ use Hash::Merge qw ( merge ); use String::Format; use Date::Parse; use List::Util qw[max]; -use Dpkg::Version qw(vercmp); # TODO: change this for running with squeeze dpkg +use Dpkg::Version (); # import nothing +if ( defined $Dpkg::Version::VERSION ) { + *vercmp = \&Dpkg::Version::version_compare; +} else { + *vercmp = \&Dpkg::Version::vercmp; +} + use Dpkg::Deps; # TODO: same our ($verbose, $mail_logs, $list_order, $list_state, diff --git a/lib/WB/QD.pm b/lib/WB/QD.pm index 4c2806f..48ae979 100644 --- a/lib/WB/QD.pm +++ b/lib/WB/QD.pm @@ -2,7 +2,12 @@ package WB::QD; use strict; use IO::Uncompress::AnyInflate qw(anyinflate); -use Dpkg::Version qw(vercmp); +use Dpkg::Version (); # import nothing +if ( defined $Dpkg::Version::VERSION ) { + *vercmp = \&Dpkg::Version::version_compare; +} else { + *vercmp = \&Dpkg::Version::vercmp; +} use Dpkg::Arch qw(debarch_is); use Data::Dumper;