Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version comparison in packages_per_pmfile seems broken in some cases #448

Open
charsbar opened this issue Apr 26, 2024 · 0 comments
Open
Labels
indexer How we index uploads

Comments

@charsbar
Copy link
Collaborator

The $version at the following line (

pause/lib/PAUSE/pmfile.pm

Lines 299 to 305 in b54e8bd

$ppp->{$pkg}{version} =
$version
if ($version||0)
> $ppp->{$pkg}{version} ||
($version||"")
gt $ppp->{$pkg}{version};
}
) usually matches the version stored in $ppp->{$pkg}{version} , but sometimes the $version may be stringified "undef" which comes from the line
$result = "undef" unless defined $result;
(via
$self->{VERSION} = $version;
and
my $version = $self->{VERSION};
).
It's probably better to add a helper function to compare versions that treats stringifiied undef as undef or 0.

@rjbs rjbs added the indexer How we index uploads label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
indexer How we index uploads
Projects
None yet
Development

No branches or pull requests

2 participants