[Rt-commit] [svn] r1189 - rt/branches/rt-3.1/sbin

huberth at pallas.eruditorum.org huberth at pallas.eruditorum.org
Thu Jul 8 13:32:38 EDT 2004


Author: huberth
Date: Thu Jul  8 13:32:37 2004
New Revision: 1189

Modified:
   rt/branches/rt-3.1/sbin/rt-test-dependencies.in
Log:
RT-Ticket: 5690
RT-Status: resolved

 * rt-test-dependencies now only tells you which modules are not present or
   up-to-date, unless you specify the -v (--verbose) flag on the command line.

Modified: rt/branches/rt-3.1/sbin/rt-test-dependencies.in
==============================================================================
--- rt/branches/rt-3.1/sbin/rt-test-dependencies.in	(original)
+++ rt/branches/rt-3.1/sbin/rt-test-dependencies.in	Thu Jul  8 13:32:37 2004
@@ -34,7 +34,7 @@
 use CPAN;
 my %args;
 my %deps;
-GetOptions(\%args,'install', 'with-MYSQL', 'with-POSTGRESQL|with-pg|with-pgsql', 'with-SQLITE', 'with-ORACLE', 'with-FASTCGI', 'with-SPEEDYCGI', 'with-MODPERL1', 'with-MODPERL2' ,'with-DEV', 'download=s');
+GetOptions(\%args, 'v|verbose', 'install', 'with-MYSQL', 'with-POSTGRESQL|with-pg|with-pgsql', 'with-SQLITE', 'with-ORACLE', 'with-FASTCGI', 'with-SPEEDYCGI', 'with-MODPERL1', 'with-MODPERL2' ,'with-DEV', 'download=s');
 
 if (!keys %args) {
     help();
@@ -83,6 +83,9 @@
 	--with-modperl2		Libraries needed to support the modperl 2 handler
 
 	--with-dev		Tools needed for RT development
+
+You can also specify -v or --verbose to list the status of all dependencies,
+rather than just the missing ones.
 .
 }
 
@@ -249,8 +252,7 @@
         print "\nRT is known to be non-functional on versions of perl older than 5.8.3.\nPlease upgrade to 5.8.3 or newer\n\n";
     }
 } else {
-    print "...found\n";
-
+    print "...found\n" if $args{'v'};
 }
 
 print "users:\n";
@@ -269,8 +271,7 @@
     while (@deps) {
         my $module = shift @deps;
         my $version = shift @deps;
-        my $ret;
-        $ret =test_dep($module, $version);	
+        my $ret = test_dep($module, $version);	
 
         if ($args{'install'} && !$ret) {
             resolve_dep($module);		
@@ -282,17 +283,17 @@
     my $module = shift;
     my $version = shift;
 
-    print "\t$module $version";
     eval "use $module $version ()";
     if ($@) {
         my $error = $@;
         $error =~ s/\n(.*)$//s;
+        print "\t$module $version";
         print "...MISSING\n";
         print "\t\t$error\n" if $error =~ /this is only/;
 
         return undef;
     } else {
-        print "...found\n";
+        print "\t$module $version...found\n" if $args{'v'};
         return 1;
     }
 }


More information about the Rt-commit mailing list