From add9a540ada4dc60a6ed5957a00947690cd73139 Mon Sep 17 00:00:00 2001 From: linggao Date: Thu, 2 Jul 2009 19:12:53 +0000 Subject: [PATCH] minor fix in Postage.pm git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3687 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Postage.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index 70129e369..278460421 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -276,7 +276,9 @@ sub makescript { my @otherpkgs=(); if (open(FILE1, "<$pkglist")) { while (readline(FILE1)) { - chomp($_); + chomp($_); #remove newline + s/\s+$//; #remove trailing spaces + next if /^\s*$/; #-- skip empty lines push(@otherpkgs,$_); } close(FILE1); @@ -365,6 +367,8 @@ sub includefile while() { chomp($_); + s/\s+$//; #remove trailing spaces + next if /^\s*$/; #-- skip empty lines push(@text, $_); }