pkg-get.pl: infer the package ordering from PKGREPO
(do not rely on lexographic sorting to compare version strings)
This commit is contained in:
parent
79b47c2223
commit
38c9a5ef1d
@ -339,14 +339,12 @@ sub getpackage {
|
||||
$pkg{'version'}, $pkg{'release'}, $pkg{'description'},
|
||||
$pkg{'md5sum'}, $pkg{'size'},
|
||||
$pkg{'pre_install'}, $pkg{'post_install'}, $pkg{'readme'});
|
||||
( ($repver{$pkgname}) and
|
||||
($repver{$pkgname} gt "$pkg{'version'}-$pkg{'release'}") )
|
||||
or $repver{$pkgname} = "$pkg{'version'}-$pkg{'release'}";
|
||||
$repver{$pkgname} = "$pkg{'version'}-$pkg{'release'}";
|
||||
}
|
||||
close (REPO);
|
||||
while (my $match = shift @maybe) {
|
||||
my ($p,$u,$v,$r,$d,$m,$s,$E,$O,$R) = split /\^/, $match;
|
||||
next if ("$v-$r" lt $repver{$pkgname});
|
||||
next if ("$v-$r" ne $repver{$pkgname});
|
||||
%res = ('name' => $pkgname, 'path' => $p,
|
||||
'url' => $u, 'version' => $v, 'release' => $r,
|
||||
'description' => $d, 'md5sum' => $m, 'size' => $s,
|
||||
@ -361,7 +359,7 @@ sub getpackage {
|
||||
sub getshortstatus {
|
||||
my %pkg = @_;
|
||||
($installed{$pkg{'name'}}) or return "[ ]";
|
||||
($installed{$pkg{'name'}} =~ /^$pkg{'version'}-$pkg{'release'}/) or return "[u]";
|
||||
($installed{$pkg{'name'}} eq "$pkg{'version'}-$pkg{'release'}") or return "[u]";
|
||||
return "[i]";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user