diff options
author | Eric Wong <e@80x24.org> | 2022-12-23 22:11:01 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-12-24 06:40:33 +0000 |
commit | 2be1aeb461f905aaf66f5b2599a0dcb22554ad40 (patch) | |
tree | f7eea26cd111230aa157ced32b8a026b4c7fe64e /lib/PublicInbox/Gcf2.pm | |
parent | 4e3de80c04d0d1490dfff97396e5783394e4c3d5 (diff) | |
download | public-inbox-2be1aeb461f905aaf66f5b2599a0dcb22554ad40.tar.gz |
This quiets down tests when the optional Inline::C is missing. We do not currently have a hard dependency on Inline::C; and we should not leave PERL_INLINE_DIRECTORY set in PublicInbox::Spawn if Inline fails to build. Leaving PERL_INLINE_DIRECTORY set by Spawn after it fails (due to missing Inline::C) would cause downstream failures in Gcf2 builds for the same reason. So we should bail out of the Gcf2 build early if Spawn already failed due to missing Inline::C. The only time we want to be noisy is if a user explicitly sets PERL_INLINE_DIRECTORY and Inline::C is missing. This reverts commit ad8acf7d6484d0a489499742cadadbd4f890ab53. ad8acf7d6484d0a4 (Gcf2: Create cache folder if missing, 2022-09-08)
Diffstat (limited to 'lib/PublicInbox/Gcf2.pm')
-rw-r--r-- | lib/PublicInbox/Gcf2.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/Gcf2.pm b/lib/PublicInbox/Gcf2.pm index 54b3d6aa..d13e6b1a 100644 --- a/lib/PublicInbox/Gcf2.pm +++ b/lib/PublicInbox/Gcf2.pm @@ -10,16 +10,14 @@ use PublicInbox::Spawn qw(which popen_rd); # may set PERL_INLINE_DIRECTORY use Fcntl qw(LOCK_EX SEEK_SET); use Time::HiRes qw(clock_gettime CLOCK_MONOTONIC); use IO::Handle; # autoflush -use File::Path qw(make_path); use PublicInbox::Git; BEGIN { my (%CFG, $c_src); # PublicInbox::Spawn will set PERL_INLINE_DIRECTORY - # to ~/.cache/public-inbox/inline-c if it exists + # to ~/.cache/public-inbox/inline-c if it exists and Inline::C works my $inline_dir = $ENV{PERL_INLINE_DIRECTORY} // die 'PERL_INLINE_DIRECTORY not defined'; - make_path($inline_dir); my $f = "$inline_dir/.public-inbox.lock"; open my $fh, '+>', $f or die "open($f): $!"; |