about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiQuery.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-10-01 00:33:15 +0000
committerEric Wong <e@80x24.org>2022-10-01 09:07:51 +0000
commitfa04201baae9d1043e37cf8ef4e5a33fdd0498ff (patch)
treefc175fde7733450fe92318206e787975d97948e2 /lib/PublicInbox/LeiQuery.pm
parentf9ac22a4b485ae5f8ad981027d8608c13f09530e (diff)
downloadpublic-inbox-fa04201baae9d1043e37cf8ef4e5a33fdd0498ff.tar.gz
lei: force --jobs=1,1 for SQLite < 3.8.3
SQLite prior to 3.8.3 did not reset its PRNG for generating
unique temporary file names, so it would barf on t/lei-up.t
occasionally due to O_EXCL -> EEXIST conflicts.

This fixes occasional test failures under CentOS 7.x which ships
SQLite 3.7.17.
Diffstat (limited to 'lib/PublicInbox/LeiQuery.pm')
-rw-r--r--lib/PublicInbox/LeiQuery.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm
index c998e5c0..df9c32b3 100644
--- a/lib/PublicInbox/LeiQuery.pm
+++ b/lib/PublicInbox/LeiQuery.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # handles "lei q" command and provides internals for
@@ -6,6 +6,7 @@
 package PublicInbox::LeiQuery;
 use strict;
 use v5.10.1;
+use PublicInbox::OverIdx;
 
 sub prep_ext { # externals_each callback
         my ($lxs, $exclude, $loc) = @_;
@@ -17,6 +18,7 @@ sub _start_query { # used by "lei q" and "lei up"
         require PublicInbox::LeiOverview;
         PublicInbox::LeiOverview->new($self) or return;
         my $opt = $self->{opt};
+        PublicInbox::OverIdx::fork_ok($opt);
         my ($xj, $mj) = split(/,/, $opt->{jobs} // '');
         (defined($xj) && $xj ne '' && $xj !~ /\A[1-9][0-9]*\z/) and
                 die "`$xj' search jobs must be >= 1\n";