Skipping comments in pkglist and ospkglist before processing

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13434 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz 2012-08-06 07:09:51 +00:00
parent c027734b2c
commit 477d41591e

View File

@ -65,6 +65,11 @@ sub include_file
chomp($_);
s/\s+$//; #remove trailing spaces
next if /^\s*$/; #-- skip empty lines
next
if ( /^\s*#/
&& !/^\s*#INCLUDE:[^#^\n]+#/
&& !/^\s*#NEW_INSTALL_LIST#/
&& !/^\s*#ENV:[^#^\n]+#/); #-- skip comments
push(@text, $_);
}
@ -86,6 +91,11 @@ sub get_package_names {
chomp;
s/\s+$//; #remove trailing white spaces
next if /^\s*$/; #-- skip empty lines
next
if ( /^\s*#/
&& !/^\s*#INCLUDE:[^#^\n]+#/
&& !/^\s*#NEW_INSTALL_LIST#/
&& !/^\s*#ENV:[^#^\n]+#/); #-- skip comments
push(@tmp_array,$_);
}
close($pkgfile);