summaryrefslogtreecommitdiff
path: root/rt/sbin
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-08-21 00:48:07 -0700
committerIvan Kohler <ivan@freeside.biz>2014-09-15 20:59:00 -0700
commit008524b8e963831999983769f7fec11f55a72f16 (patch)
tree30b22daa59b4c9be3f375d058f0a9c1f034e6ca8 /rt/sbin
parentd10fe3d48da3f3bdb423efe42d624e9d1013c958 (diff)
rt 4.0.21 (RT#13852)
Diffstat (limited to 'rt/sbin')
-rw-r--r--rt/sbin/rt-fulltext-indexer.in16
-rw-r--r--rt/sbin/rt-test-dependencies.in12
2 files changed, 26 insertions, 2 deletions
diff --git a/rt/sbin/rt-fulltext-indexer.in b/rt/sbin/rt-fulltext-indexer.in
index b84ca9499..b90d8dacf 100644
--- a/rt/sbin/rt-fulltext-indexer.in
+++ b/rt/sbin/rt-fulltext-indexer.in
@@ -84,8 +84,9 @@ use RT::Interface::CLI ();
my %OPT = (
help => 0,
debug => 0,
+ quiet => 0,
);
-my @OPT_LIST = qw(help|h! debug!);
+my @OPT_LIST = qw(help|h! debug! quiet);
my $db_type = RT->Config->Get('DatabaseType');
if ( $db_type eq 'Pg' ) {
@@ -122,6 +123,18 @@ if ( $OPT{'help'} ) {
);
}
+use Fcntl ':flock';
+if ( !flock main::DATA, LOCK_EX | LOCK_NB ) {
+ if ( $OPT{quiet} ) {
+ RT::Logger->info("$0 is already running; aborting silently, as requested");
+ exit;
+ }
+ else {
+ print STDERR "$0 is already running\n";
+ exit 1;
+ }
+}
+
my $fts_config = RT->Config->Get('FullTextSearch') || {};
unless ( $fts_config->{'Enable'} ) {
print STDERR <<EOT;
@@ -463,3 +476,4 @@ Alex Vandiver E<lt>alexmv@bestpractical.comE<gt>
=cut
+__DATA__
diff --git a/rt/sbin/rt-test-dependencies.in b/rt/sbin/rt-test-dependencies.in
index 66215ad29..d41337a96 100644
--- a/rt/sbin/rt-test-dependencies.in
+++ b/rt/sbin/rt-test-dependencies.in
@@ -181,6 +181,12 @@ sub text_to_hash {
return %hash;
}
+sub set_dep {
+ my ($name, $module, $version) = @_;
+ my %list = @{$deps{$name}};
+ $list{$module} = ($version || '');
+ $deps{$name} = [ %list ];
+}
$deps{'CORE'} = [ text_to_hash( << '.') ];
Class::Accessor 0.34
@@ -253,6 +259,8 @@ Plack 0.9971
Plack::Handler::Starlet
CGI::Emulate::PSGI
.
+set_dep( PSGI => CGI => 4.00 ) if $] > 5.019003;
+
$deps{'MAILGATE'} = [ text_to_hash( << '.') ];
Getopt::Long
@@ -296,7 +304,7 @@ Test::Builder 0.90 # needed for is_passing
Test::MockTime
Log::Dispatch::Perl
Test::WWW::Mechanize::PSGI
-Plack::Middleware::Test::StashWarnings 0.06
+Plack::Middleware::Test::StashWarnings 0.08
Test::LongString
Test::NoWarnings
Locale::PO
@@ -374,6 +382,7 @@ HTML::Entities
my %AVOID = (
'DBD::Oracle' => [qw(1.23)],
+ 'DBD::Pg' => [qw(3.3.0)],
'Email::Address' => [qw(1.893 1.894)],
'Devel::StackTrace' => [qw(1.28 1.29)],
);
@@ -453,6 +462,7 @@ sub test_dep {
print $module, ': ', $version || 0, "\n";
}
else {
+ no warnings 'deprecated';
eval "use $module $version ()";
if ( my $error = $@ ) {
return 0 unless wantarray;