[LON-CAPA-cvs] cvs: doc /loncapafiles rpmcheck.piml

matthew lon-capa-cvs@mail.lon-capa.org
Fri, 28 May 2004 12:45:19 -0000


matthew		Fri May 28 08:45:19 2004 EDT

  Modified files:              
    /doc/loncapafiles	rpmcheck.piml 
  Log:
  Modified rpm existance check to only run rpm -q -a once.  Added zip related
  dependencies (Bug 2701).
  
  
Index: doc/loncapafiles/rpmcheck.piml
diff -u doc/loncapafiles/rpmcheck.piml:1.4 doc/loncapafiles/rpmcheck.piml:1.5
--- doc/loncapafiles/rpmcheck.piml:1.4	Tue May 25 11:55:04 2004
+++ doc/loncapafiles/rpmcheck.piml	Fri May 28 08:45:18 2004
@@ -3,7 +3,7 @@
 <!-- phpcheck.piml -->
 <!-- Matthew Hall -->
 
-<!-- $Id: rpmcheck.piml,v 1.4 2004/05/25 15:55:04 matthew Exp $ -->
+<!-- $Id: rpmcheck.piml,v 1.5 2004/05/28 12:45:18 matthew Exp $ -->
 
 <!--
 
@@ -71,10 +71,12 @@
 }
 #
 # Look for packages which we need to be present
+my @RPMS = `rpm -q -a`;
 foreach my $rpm ('psutils','openssl-devel','perl-suidperl',
-                 'gnuplot-3.7.1-5','apache-1.3','mod_perl.1') {
-    my @RPMs = `rpm -q -a | grep $rpm`;
-    if (! @RPMs) {
+                 'gnuplot-3.7.1-5','apache-1.3','mod_perl.1',
+                 '^gzip','^zip-','^bzip2-libs','^unzip','^bzip2','^tar-') {
+    my @matching_rpms = grep(/$rpm/,@RPMS);
+    if (! @matching_rpms) {
         print "WARNING: ".$rpm." does not appear to be installed.\n";
     }
 }