Skip to content

Commit

Permalink
(check-update) textproc/p5-POD2-Base (0.0301 < 0.043 ) issue
Browse files Browse the repository at this point in the history
  • Loading branch information
makoto-fujiwara committed May 1, 2017
1 parent 26b63ff commit fcf0eaf
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions check-update
Original file line number Diff line number Diff line change
Expand Up @@ -1395,21 +1395,25 @@ sub ColorUrlDigit($) {
}

sub CompareVersion_make_equal_length($$) {

# textproc/p5-POD2-Base:
# If starting digit + period (0.0301 or 0.043 ) and the length is different,
# supply 0 to make both length the same.

my $a = shift;
my $b = shift;
my $diff = length($a) - length($b);
if ($diff == 0) {}
elsif ($diff > 0 ) {
while ($diff--) {
$b .='0';
}
} else {
while ($diff++ < 0) {
$a .='0';
else {
if (substr($a, 0, 1 ) eq 0 &&
substr($b, 0, 1 ) eq 0 ) {
if ($diff > 0 ) {
while ($diff--) {
$b .='0';
}
} else {
while ($diff++ < 0) {
$a .='0';
}
}
}
}
return ($a, $b);
Expand Down Expand Up @@ -1438,8 +1442,8 @@ sub CompareVersion($$){
if ($a[0] == $b[0]) {
# if ( $max_count = 1 ) {return 0;}
if ( $max_count == 2 ) {
print STDERR sprintf("%4d ", __LINE__), 'max count: ', $max_count, 'a: ', $a, ' b: ',$b,"\n";
# ($a[1], $b[1]) = CompareVersion_make_equal_length($a[1], $b[1]); # 0.043 > 0.0301
print STDERR sprintf("%4d ", __LINE__), 'max count: ', $max_count, 'a: ', $a, ' b: ',$b,"\n";
($a[1], $b[1]) = CompareVersion_make_equal_length($a[1], $b[1]); # 0.043 > 0.0301
# above line is harmfull for (pango) 1.40.3 -> 1.40.5 or 1.9.1
}
if ($a[1] > $b[1]) { return 1;}
Expand Down

0 comments on commit fcf0eaf

Please sign in to comment.