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

version 1.7, 2001/04/04 12:48:55 version 1.8, 2001/05/03 15:18:06
Line 1 Line 1
 #!/usr/bin/perl  #!/usr/bin/perl
   
 my ($standard,$current)=@ARGV;  my ($standard,$current,$expected)=@ARGV;
   
 $standard=~s/[^\/\w\.]//g;  $standard=~s/[^\/\w\.]//g;
 $current=~s/[^\/\w\.]//g;  $current=~s/[^\/\w\.]//g;
   $expected=~s/[^\/\w\.]//g;
 my %svhash;  my %svhash;
 my %sbhash;  my %sbhash;
   my %chash;
   
 my @oldrpms;  my @oldrpms;
 my @badversionrpms;  my @badversionrpms;
 my @newrpms;  my @newrpms;
 my @externalrpms;  my @externalrpms;
   my @barerpms;
   my @developrpms;
   
 open IN, "<$standard";  open IN, "<$standard";
 while(<IN>) {  while(<IN>) {
Line 25  open IN, "<$current"; Line 29  open IN, "<$current";
 while(<IN>) {  while(<IN>) {
     chop;      chop;
     my ($name,$version,$buildtime)=split(/\s+/);      my ($name,$version,$buildtime)=split(/\s+/);
       $chash{$name}=1;
     if ($svhash{$name}) {      if ($svhash{$name}) {
  unless ($svhash{$name} eq $version) {   unless ($svhash{$name} eq $version) {
     push @badversionrpms,"$name is version $version, should be $svhash{$name}\n";      push @badversionrpms,"$name is version $version, should be $svhash{$name}\n";
Line 42  while(<IN>) { Line 47  while(<IN>) {
 }  }
 close IN;  close IN;
   
   open IN,"<$expected";
   while(<IN>) {
       chop;
       next unless /^[YN] \w/;
       /(.).(.*)/;
       my $type=$1;
       my $package=$2;
       $package=~s/\-[^\-]*\-[^\-]*$//;
       print "<br>$type $package\n";
       if (!$chash{$package}) {
    push @barerpms,"$package is missing and is of basic necessity to a LON-CAPA system\n" if $type eq 'Y';
    push @developrpms,"$package is missing and may be useful for a LON-CAPA system\n" if $type eq 'N';
       }
   }
   close IN;
   
 my $date=`date`; chop $date;  my $date=`date`; chop $date;
 my $hostname=`hostname`; chop $hostname;  my $hostname=`hostname`; chop $hostname;
 print <<END;  print <<END;
Line 56  print <<END; Line 77  print <<END;
 <br />Learning Online with CAPA  <br />Learning Online with CAPA
 <br />Contact korte\@lon-capa.org  <br />Contact korte\@lon-capa.org
 <ul>  <ul>
   <li>Important warnings</li>
 <li>About this file</li>  <li>About this file</li>
 <li>Bad RPM Versions</li>  <li>Bad RPM Versions</li>
 <li>Out-of-date RPMS</li>  <li>Out-of-date RPMS</li>
 <li>Newer than expected RPMS</li>  <li>Newer than expected RPMS</li>
 <li>RPMS external to LON-CAPA</li>  <li>RPMS external to LON-CAPA</li>
   <li>RPMS from the "bare minimum" set that you are missing</li>
   <li>RPMS from the "development" set that you are missing</li>
 </ul>  </ul>
   <font size="+2">Important warnings</font>
   <p>
   <b>Never install LON-CAPA-setup</b> on a running LON-CAPA machine.
   This RPM package contains pre-installation files such as 
   /etc/group and /etc/passwd.  You will lose all access to your
   machine if you install this RPM.
   </p>
   <p>
   If you are doing CVS-based upgrades of your LON-CAPA
   software, then you do not need to upgrade your LON-CAPA-base
   RPM.  Upgrading with the LON-CAPA-base RPM
   will cause you to lose many of your system-specific
   configuration settings.
   </p>
   <p>
   DO NOT UPGRADE YOUR KERNEL UNLESS YOU KNOW WHAT YOU ARE DOING.
   Kernel upgrading involves packages beginning with the word
   "kernel".
   </p>
 <font size="+2">About this file</font>  <font size="+2">About this file</font>
 <p>  <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>
   <p>
   Managing software packages on any system, testing different
   sets of software packages, tracking their dependencies, and maintaining
   configuration information is an inexact science.  While the LON-CAPA
   recommended set of RPMs is a tested set with no missing dependencies,
   we still highly recommend that RPM upgrades are only performed
   by those with significant knowledge about standard Linux operating
   systems.
   </p>
 END  END
     print <<END;      print <<END;
 <font size="+2">Differing RPM Versions</font>  <font size="+2">Differing RPM Versions</font>
Line 106  foreach my $rpminfo (@externalrpms) { Line 158  foreach my $rpminfo (@externalrpms) {
     print $rpminfo;      print $rpminfo;
 }  }
 print <<END;  print <<END;
   </pre>
   END
   print <<END;
   <font size="+2">RPMS from the "bare minimum" set that you are missing</font>
   <pre>
   END
   foreach my $rpminfo (@barerpms) {
       print $rpminfo;
   }
   print <<END;
   </pre>
   END
   print <<END;
   <font size="+2">RPMS from the "development" set that you are missing</font>
   <pre>
   END
   foreach my $rpminfo (@developrpms) {
       print $rpminfo;
   }
   print <<END;
 </pre>  </pre>
 END  END

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


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