]> git.donarmstrong.com Git - wannabuild.git/commitdiff
Newer versions of Dpkg::Version export version_compare instead of vercmp.
authorHilko Bengen <bengen@debian.org>
Wed, 30 Mar 2011 19:48:20 +0000 (21:48 +0200)
committerAndreas Barth <aba@not.so.argh.org>
Wed, 30 Mar 2011 21:03:10 +0000 (23:03 +0200)
bin/wanna-build
lib/WB/QD.pm

index fa138743c779a9fa621b61ff8440661c3ca03043..8787c717f24ae9dc837e804a2a92d8afc60873f4 100755 (executable)
@@ -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,
index 4c2806fe0cbae72d7d079ea6c16e49488194838f..48ae97902b84e661ff9631f39b171e83af94afbd 100644 (file)
@@ -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;