From 0eccaea186c53d1eacf895e7aec6c553c3e13a39 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Tue, 22 Jan 2013 16:48:48 +0000 Subject: [PATCH] Fixing bug 3296: cleanup a variable that used in a loop to remove the duplicated packagenames git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14948 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/imgutils/imgutils.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm b/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm index c93e8fb19..32787c595 100644 --- a/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm +++ b/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm @@ -81,10 +81,13 @@ sub include_file sub get_package_names { my $plist_file_list=shift; my %pkgnames=(); - my @tmp_array=(); my @plist_file_names = split ',', $plist_file_list; foreach my $plist_file_name ( @plist_file_names ) { + + # this variable needs to be cleaned when loop the pkglist files + my @tmp_array=(); + if ($plist_file_name && -r $plist_file_name) { my $pkgfile; open($pkgfile,"<","$plist_file_name");