find the only version from dpkg -I

This commit is contained in:
baiyuan 2014-11-07 03:20:13 -05:00
parent 392fc1b3cb
commit cec473c646

View File

@ -353,10 +353,10 @@ sub find_latest_pkg_deb
}
foreach my $r (@deblist) {
my $basename = `dpkg -I $r* |grep Package|awk '{print \$2}'`;
my $basename = `dpkg -I $r* |grep Package|awk '{print \$2}'|head -1`;
chomp $basename;
my $version = `dpkg -I $r* |grep Version|awk '{print \$2}'`;
my $version = `dpkg -I $r* |grep Version|awk '{print \$2}'|head -1`;
chomp $version;
$founddeb{$basename}{$r}{version}=$version;