+2007-10-15 Raphael Hertzog <hertzog@debian.org>
+
+ * scripts/Dpkg/Version.pm: fix compare_versions to handle properly
+ the >= cases (it was improperly handled like >> due to a bad regexp).
+
2007-10-14 Raphael Hertzog <hertzog@debian.org>
* scripts/Dpkg/Version.pm: mark compare_versions as exportable.
my $rel = $_[1];
my $res = vercmp($_[0], $_[2]);
- if ($rel eq 'gt' or $rel =~ />?>/) {
+ if ($rel eq 'gt' or $rel eq ">" or $rel eq ">>") {
return $res > 0;
} elsif ($rel eq 'ge' or $rel eq '>=') {
return $res >= 0;
return $res == 0;
} elsif ($rel eq 'le' or $rel eq '<=') {
return $res <= 0;
- } elsif ($rel eq 'lt' or $rel =~ /<?</) {
+ } elsif ($rel eq 'lt' or $rel eq "<" or $rel eq "<<") {
return $res < 0;
} else {
die "bad relation '$rel'";