Diff for /loncom/build/rpmparse.pl between versions 1.1 and 1.7

version 1.1, 2001/04/03 13:23:06 version 1.7, 2001/04/04 12:48:55
Line 2 Line 2
   
 my ($standard,$current)=@ARGV;  my ($standard,$current)=@ARGV;
   
 $standard=~s/[^\/\w]//g;  $standard=~s/[^\/\w\.]//g;
 $current=~s/[^\/\w]//g;  $current=~s/[^\/\w\.]//g;
 my %svhash;  my %svhash;
 my %sbhash;  my %sbhash;
   
Line 12  my @badversionrpms; Line 12  my @badversionrpms;
 my @newrpms;  my @newrpms;
 my @externalrpms;  my @externalrpms;
   
 open IN, $standard;  open IN, "<$standard";
 while(<IN>) {  while(<IN>) {
     chop;      chop;
     my ($name,$version,$buildtime)=split(/\s+/);      my ($name,$version,$buildtime)=split(/\s+/);
Line 21  while(<IN>) { Line 21  while(<IN>) {
 }  }
 close IN;  close IN;
   
 open IN, $current;  open IN, "<$current";
 while(<IN>) {  while(<IN>) {
     chop;      chop;
     my ($name,$version,$buildtime)=split(/\s+/);      my ($name,$version,$buildtime)=split(/\s+/);
Line 33  while(<IN>) { Line 33  while(<IN>) {
     push @newrpms,"$name was built ".localtime($buildtime)." when the expected build time was ".localtime($sbhash{$name})."\n";      push @newrpms,"$name was built ".localtime($buildtime)." when the expected build time was ".localtime($sbhash{$name})."\n";
  }   }
  if ($sbhash{$name}>$buildtime) {   if ($sbhash{$name}>$buildtime) {
     push @newrpms,"$name was built ".localtime($sbhash{$name})." when the expected build time was ".localtime($buildtime)."\n";      push @oldrpms,"$name was built ".localtime($buildtime)." when the expected build time was ".localtime($sbhash{$name})."\n";
  }   }
     }      }
     else {      else {
Line 43  while(<IN>) { Line 43  while(<IN>) {
 close IN;  close IN;
   
 my $date=`date`; chop $date;  my $date=`date`; chop $date;
 my $hostname=hostname;  my $hostname=`hostname`; chop $hostname;
 print <<END;  print <<END;
 <HTML>  <html>
 <HEAD>  <head>
 <TITLE>LON-CAPA Software RPM Status Page</TITLE>  <title>LON-CAPA Software RPM Status Page</title>
 </HEAD>  </head>
 <BODY>  <body>
 <FONT SIZE=+2>LON-CAPA Software RPM Status Page (done on $date for $hostname)</FONT>  <font size="+2">LON-CAPA Software RPM Status Page
 <BR>Michigan State University  (done on $date for $hostname)</font>
 <BR>Learning Online with CAPA  <br />Michigan State University
 <BR>Contact korte@lon-capa.org  <br />Learning Online with CAPA
 <UL>  <br />Contact korte\@lon-capa.org
 <LI>About this file</LI>  <ul>
 <LI>Bad RPM Versions</LI>  <li>About this file</li>
 <LI>Out-of-date RPMS</LI>  <li>Bad RPM Versions</li>
 <LI>Newer than expected RPMS</LI>  <li>Out-of-date RPMS</li>
 <LI>RPMS external to LON-CAPA</LI>  <li>Newer than expected RPMS</li>
 </UL>  <li>RPMS external to LON-CAPA</li>
 <FONT SIZE=+2>About this file</FONT>  </ul>
 <P>  <font size="+2">About this file</font>
   <p>
 This file is generated dynamically by <tt>make rpmstatuspost</tt>  This file is generated dynamically by <tt>make rpmstatuspost</tt>
 when this command is entered in the CVS:loncom/build directory.  when this command is entered in the CVS:loncom/build directory.
 </P>  </p>
 END  END
     print <<END;      print <<END;
 <FONT SIZE=+2>Bad RPM Versions</FONT>  <font size="+2">Differing RPM Versions</font>
 <PRE>  <pre>
 END  END
 foreach my $rpminfo (@badversionrpms) {  foreach my $rpminfo (@badversionrpms) {
     print $rpminfo;      print $rpminfo;
 }  }
 print <<END;  print <<END;
 </PRE>  </pre>
 END  END
 print <<END;  print <<END;
 <FONT SIZE=+2>Out-of-date RPMS</FONT>  <font size="+2">Out-of-date RPMS</font>
 <PRE>  <pre>
 END  END
 foreach my $rpminfo (@oldrpms) {  foreach my $rpminfo (@oldrpms) {
     print $rpminfo;      print $rpminfo;
 }  }
 print <<END;  print <<END;
 </PRE>  </pre>
 END  END
 print <<END;  print <<END;
 <FONT SIZE=+2>Newer than expected RPMS</FONT>  <font size="+2">Newer than expected RPMS</font>
 <PRE>  <pre>
 END  END
 foreach my $rpminfo (@newrpms) {  foreach my $rpminfo (@newrpms) {
     print $rpminfo;      print $rpminfo;
 }  }
 print <<END;  print <<END;
 </PRE>  </pre>
 END  END
 print <<END;  print <<END;
 <FONT SIZE=+2>RPMS external to LON-CAPA</FONT>  <font size="+2">RPMS external to LON-CAPA</font>
 <PRE>  <pre>
 END  END
 foreach my $rpminfo (@externalrpms) {  foreach my $rpminfo (@externalrpms) {
     print $rpminfo;      print $rpminfo;
 }  }
 print <<END;  print <<END;
 </PRE>  </pre>
 END  END

Removed from v.1.1  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>