+2007-11-29 Guillem Jover <guillem@debian.org>
+
+ * scripts/dpkg-scanpackages.pl: Use Dpkg::Version.
+ (vercmp): Use compare_versions instead of 'dpkg --compare-versions'.
+
2007-11-29 Guillem Jover <guillem@debian.org>
* scripts/dpkg-scanpackages.pl: Use Dpkg::ErrorHandling. Use error
* Move extern declarations to header files and stop defining them as extern.
* Unify parsing of Section and Priority in dpkg-gencontrol with Homepage.
* Change dpkg-scanpackages to use the Dpkg::ErrorHandling module.
+ * Change dpkg-scanpackages to use the Dpkg::Versions module.
-- Guillem Jover <guillem@debian.org> Sat, 24 Nov 2007 07:38:13 +0200
use Dpkg::Gettext;
use Dpkg::ErrorHandling qw(error syserr subprocerr);
use Dpkg::Deps qw(@pkg_dep_fields);
+use Dpkg::Version qw(compare_versions);
textdomain("dpkg-dev");
sub vercmp {
my ($a,$b)=@_;
return $vercache{$a}{$b} if exists $vercache{$a}{$b};
- system('dpkg','--compare-versions',$a,'le',$b);
- $vercache{$a}{$b}=$?;
- return $?;
+ $vercache{$a}{$b} = compare_versions($a, 'gt', $b);
+ return $vercache{$a}{$b};
}
my $find_h = new IO::Handle;