From cec473c64657c2f20068dab3678df12015c825f7 Mon Sep 17 00:00:00 2001 From: baiyuan Date: Fri, 7 Nov 2014 03:20:13 -0500 Subject: [PATCH] find the only version from dpkg -I --- xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm b/xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm index cf2254abd..72e13c120 100644 --- a/xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm +++ b/xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm @@ -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;