[LON-CAPA-cvs] cvs: loncom /build/system_dependencies perltest.pl

harris41 lon-capa-cvs@mail.lon-capa.org
Sat, 04 May 2002 21:59:42 -0000


harris41		Sat May  4 17:59:42 2002 EDT

  Modified files:              
    /loncom/build/system_dependencies	perltest.pl 
  Log:
  prompting the user to retrieve the LON-CAPA-systemperl RPM if needed
  due to missing perl modules
  
  
Index: loncom/build/system_dependencies/perltest.pl
diff -u loncom/build/system_dependencies/perltest.pl:1.4 loncom/build/system_dependencies/perltest.pl:1.5
--- loncom/build/system_dependencies/perltest.pl:1.4	Wed Nov 28 13:26:50 2001
+++ loncom/build/system_dependencies/perltest.pl	Sat May  4 17:59:42 2002
@@ -257,5 +257,51 @@
 unless ($errorflag) {
     print "All perl modules needed by LON-CAPA appear to be present.\n";
 }
-
+else {
+    print "You are missing perl modules on your system.\n";
+    if (-e '/etc/redhat-release') {
+	$RHversion = (split /\s/, `cat /etc/redhat-release`)[4];
+	if ($RHversion=~/^7\./) {
+	    print(<<END);
+Please visit: http://install.lon-capa.org/3.1/latestRPMS/
+Download an RPM looking like: LON-CAPA-systemperl-*.*-rh72.i386.rpm
+Upgrade: rpm -Uvh --force LON-CAPA-systemperl-*.*-rh72.i386.rpm
+(Note that you will need to replace the '*' asterisks with
+the most up to date version number present within the latestRPMS
+directory.)
+END
+	}
+        elsif ($RHversion=~/^6\./) {
+	    print(<<END);
+Please visit: http://install.lon-capa.org/3.1/latestRPMS/
+Download an RPM looking like: LON-CAPA-systemperl-*.*-1.i386.rpm
+Upgrade: rpm -Uvh --force LON-CAPA-systemperl-*.*-1.i386.rpm
+(Note that you will need to replace the '*' asterisks with
+the most up to date version number present within the latestRPMS
+directory.)
+END
+        }
+        else {
+	    print(<<END);
+You are running a version of RedHat that appears to be neither
+version 6.* or version 7.*.
+Please consult CVS:doc/otherfiles/perl_modules.txt for a detailed
+description of all the perl modules that should be on your system.
+You may also want to look at the contents of this script
+(CVS:loncom/build/system_dependencies/perltest.pl).
+You can retrieve needed perl modules from http://www.cpan.org/.
+END
+        }
+    }
+    else {
+	print(<<END);
+You appear to be running a non-RedHat system.  Please consult
+CVS:doc/otherfiles/perl_modules.txt for a detailed description of
+all the perl modules that should be on your system.  You
+may also want to look at the contents of this script
+(CVS:loncom/build/system_dependencies/perltest.pl).
+You can retrieve needed perl modules from http://www.cpan.org/.
+END
+    }
+}
 exit $errorflag;