[LON-CAPA-cvs] cvs: loncom /build CHECKRPMS

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 05 Oct 2006 17:44:38 -0000


raeburn		Thu Oct  5 13:44:38 2006 EDT

  Modified files:              
    /loncom/build	CHECKRPMS 
  Log:
  Eliminate message generation for RHES in some additonal cases where no action is required.  
  
  
Index: loncom/build/CHECKRPMS
diff -u loncom/build/CHECKRPMS:1.3 loncom/build/CHECKRPMS:1.4
--- loncom/build/CHECKRPMS:1.3	Wed Oct  4 15:47:33 2006
+++ loncom/build/CHECKRPMS	Thu Oct  5 13:44:38 2006
@@ -181,13 +181,20 @@
     if (open (PIPE, "$up2date -l 2>&1 |")) {
         my @result=<PIPE>;
         close(PIPE);
+        my $output; 
+        foreach my $line (@result) {
+            if ($line =~ /^The following Packages were marked to be skipped by your configuration:/) {
+                last;
+            } else {
+                $output .= $line;
+            }
+        } 
         if (@result > 0) {
-            my $output = join('',@result);
             if ($output =~ /Fetching Obsoletes list/) {
                 $up2date_error = 0;
                 if ($output =~ /Name\s+Version\s+Rel\s+[\n\r\f]+\-+[\n\r\f]+(.+)/s) {
                     my $packagelist = $1;
-                    unless (($packagelist =~ /^The following Packages were marked to be skipped by your configuration:/) || ($packagelist eq '')) {
+                    if ($packagelist ne '' && $packagelist !~ /^[\s\n\r\f]+$/) {
                         open(TMPFILE,">>$tmpfile");
                         print TMPFILE $packagelist;
                         close(TMPFILE);