[otrs-cvs] otrs/bin otrs.CheckModules.pl,1.44,1.45

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs/bin
In directory lancelot:/tmp/cvs-serv7209/bin

Modified Files:
	otrs.CheckModules.pl 
Log Message:
Follow-up for bug#9015 - now also warns when not all prerequisites are installed.

Author: mb

Index: otrs.CheckModules.pl
===================================================================
RCS file: /home/cvs/otrs/bin/otrs.CheckModules.pl,v
retrieving revision 1.44
retrieving revision 1.45
diff -2 -u -d -r1.44 -r1.45
--- otrs.CheckModules.pl	4 Jan 2013 19:15:37 -0000	1.44
+++ otrs.CheckModules.pl	14 Jan 2013 16:26:36 -0000	1.45
@@ -489,8 +489,6 @@
     }
     print "o $Module->{Module}";
-    my $Length = length( $Module->{Module} ) + ( $Depends * 3 );
-    for ( $Length .. 32 ) {
-        print ".";
-    }
+    my $Length = 33 - ( length( $Module->{Module} ) + ( $Depends * 3 ) );
+    print '.' x $Length;
 
     # use internal EU:MM sub to determine if given module is installed
@@ -507,4 +505,11 @@
         );
 
+        # test if all module dependencies are installed by requiring the module
+        my $MissingDependencies;
+        if ( !eval "require $Module->{Module}" ) {
+            print "failed!!! Not all prerequisites installed. ";
+            $MissingDependencies = 1;
+        }
+
         if ( $Module->{NotSupported} ) {
 
@@ -545,4 +550,7 @@
             }
         }
+        elsif ($MissingDependencies) {
+            print "(v$Version)\n";
+        }
         else {
             print "ok (v$Version)\n";
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.