Get correct version for updates

https://sourceforge.net/tracker/?func=detail&atid=117457&aid=3107449&group_id=17457
This commit is contained in:
Jamie Cameron
2010-11-11 15:44:20 -08:00
parent 1de2e370b5
commit 2bc1d19229

View File

@@ -79,9 +79,10 @@ my $cmd = "apt-get -s install ".
my $out = &backquote_command($cmd);
my @rv;
foreach my $l (split(/\r?\n/, $out)) {
if ($l =~ /Inst\s+(\S+)\s+\[(\S+)\]/) {
if ($l =~ /Inst\s+(\S+)\s+\[(\S+)\]\s+\(([^ \)]+)/ ||
$l =~ /Inst\s+(\S+)\s+\[(\S+)\]/) {
my $pkg = { 'name' => $1,
'version' => $2 };
'version' => $3 || $2 };
if ($pkg->{'version'} =~ s/^(\S+)://) {
$pkg->{'epoch'} = $1;
}