From 20818652a1ee03ef5042426fd6fe5832e9d382d3 Mon Sep 17 00:00:00 2001 From: mellor Date: Tue, 13 Apr 2010 20:02:58 +0000 Subject: [PATCH] allow comments in otherpkgs.pkglists with updatenode git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5761 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Postage.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index 72752a7a9..0c518e7df 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -304,8 +304,7 @@ sub makescript { if (!$pkglist) { $pkglist=xCAT::SvrUtils->get_otherpkgs_pkglist_file_name("$::XCATROOT/share/xcat/$stat/$platform", $profile, $os, $arch); } } } - print "pkglist=$pkglist\n"; - +# print "pkglist=$pkglist\n"; if ($pkglist) { my @otherpkgs=(); if (open(FILE1, "<$pkglist")) { @@ -456,10 +455,13 @@ sub includefile return "#INCLUDEBAD:cannot open $file#"; while() { - chomp($_); - s/\s+$//; #remove trailing spaces - next if /^\s*$/; #-- skip empty lines - push(@text, $_); + chomp($_); #remove newline + s/\s+$//; #remove trailing spaces + next if /^\s*$/; #-- skip empty lines + next if ( /^\s*#/ && + !/^\s*#INCLUDE:/ && + !/^\s*#NEW_INSTALL_LIST#/ ); #-- skip comments + push(@text, $_); } close(INCLUDE);