File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,21 @@ echo "add-auto-load-safe-path $HOME/work/httpd/httpd/.gdbinit" >> $HOME/.gdbinit
7373if ! test -v SKIP_TESTING -o -v NO_TEST_FRAMEWORK; then
7474 # Clear CPAN cache if necessary
7575 if [ -v CLEAR_CACHE ]; then rm -rf ~ /perl5; fi
76+
77+ if ! perl -V > perlver; then
78+ : Perl binary broken
79+ perl -V
80+ exit 1
81+ fi
82+
83+ # Compare the current "perl -V" output with the output at the time
84+ # the cache was built; flush the cache if it's changed to avoid
85+ # failure later when /usr/bin/perl refuses to load a mismatched XS
86+ # module.
87+ if ! cmp -s perlver ~ /perl5/.perlver; then
88+ : Purging cache since " perl -V" output has changed
89+ rm -rf ~ /perl5
90+ fi
7691
7792 cpanm --local-lib=~ /perl5 local::lib && eval $( perl -I ~ /perl5/lib/perl5/ -Mlocal::lib)
7893
@@ -85,11 +100,11 @@ if ! test -v SKIP_TESTING -o -v NO_TEST_FRAMEWORK; then
85100 # CC=gcc, e.g. for the CC="gcc -m32" case the builds are not correct
86101 # otherwise.
87102 CC=gcc cpanm --notest $pkgs
88-
89- # Set cache key.
90- echo $pkgs > ~ /perl5/.key
91103 unset pkgs
92104
105+ # Cache the perl -V output for future verification.
106+ mv perlver ~ /perl5/.perlver
107+
93108 # Make a shallow clone of httpd-tests git repo.
94109 git clone -q --depth=1 https://github.com/apache/httpd-tests.git test/perl-framework
95110fi
You can’t perform that action at this time.
0 commit comments