[Rt-commit] rt branch, 4.0/test-dependencies-conclusion-with-install, created. rt-4.0.5-60-g8b2817f

? sunnavy sunnavy at bestpractical.com
Wed Feb 15 08:03:44 EST 2012


The branch, 4.0/test-dependencies-conclusion-with-install has been created
        at  8b2817fe2661cd8235971c2a7e8ea7762b90b7ae (commit)

- Log -----------------------------------------------------------------
commit 8b2817fe2661cd8235971c2a7e8ea7762b90b7ae
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Feb 15 20:49:14 2012 +0800

    run rt-test-dependencies again to get conclusion right if with --install
    
    some dependencies seems can not be "used" successfully after first "use"
    failure.  we can run the command again to avoid this situation.
    
    see also #19424

diff --git a/sbin/rt-test-dependencies.in b/sbin/rt-test-dependencies.in
index 03c813b..3a677c4 100755
--- a/sbin/rt-test-dependencies.in
+++ b/sbin/rt-test-dependencies.in
@@ -56,6 +56,7 @@ no warnings qw(numeric redefine);
 use Getopt::Long;
 my %args;
 my %deps;
+my @orig_argv = @ARGV;
 GetOptions(
     \%args,                               'v|verbose',
     'install',                            'with-MYSQL',
@@ -402,7 +403,12 @@ foreach my $type (sort grep $args{$_}, keys %args) {
     $Missing_By_Type{$type} = \%missing if keys %missing;
 }
 
-conclude(%Missing_By_Type);
+if ( $args{'install'} && keys %Missing_By_Type ) {
+    system($0, grep { $_ ne '--install' } @orig_argv );
+}
+else {
+    conclude(%Missing_By_Type);
+}
 
 sub test_deps {
     my @deps = @_;

-----------------------------------------------------------------------


More information about the Rt-commit mailing list