From: Joe Orton Date: Mon, 14 Oct 2024 13:53:01 +0000 (+0000) Subject: CI: Flush the CPAN cache if /usr/bin/perl has been updated since X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c34a276aeab1aaca5f434e55e83f001848071697;p=thirdparty%2Fapache%2Fhttpd.git CI: Flush the CPAN cache if /usr/bin/perl has been updated since the cache was built. Possible fix for 2.4.x failure seen here: https://github.com/apache/httpd/actions/runs/11322484507/job/31483266212 SSLeay.c: loadable library and perl binaries are mismatched (got first handshake key 0xeb00080, needed 0xf380080) perldiag(1) describes this as a mismatch between libraries and binaries, likely solved by reinstalling XS modules: https://github.com/Perl/perl5/blob/77b78882c76e7461ccc4dcf2eb3afb9644836a72/pod/perldiag.pod#L3617 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921307 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/travis_before_linux.sh b/test/travis_before_linux.sh index 79b983c0abb..1c0f3018933 100755 --- a/test/travis_before_linux.sh +++ b/test/travis_before_linux.sh @@ -66,6 +66,13 @@ echo "add-auto-load-safe-path $HOME/work/httpd/httpd/.gdbinit" >> $HOME/.gdbinit if ! test -v SKIP_TESTING -o -v NO_TEST_FRAMEWORK; then # Clear CPAN cache if necessary if [ -v CLEAR_CACHE ]; then rm -rf ~/perl5; fi + + # Also flush if the system Perl is newer than the cache, otherwise + # it may refuse to load the (older) XS modules. + if [ /usr/bin/perl -nt ~/perl5/.key ]; then + : Purging cache since /usr/bin/perl has been updated + rm -rf ~/perl5 + fi cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)