Skip to content

Commit

Permalink
Fix GNU/{Hurd,kFreeBSD,kNetBSD} hint files in several modules
Browse files Browse the repository at this point in the history
The idiom of

  do './hints/linux.pl' or die $@;

broke with Perl-Toolchain-Gang/ExtUtils-MakeMaker#367
which made $self a lexical variable so it is no longer visible in a file
loaded with 'do'.

This silently makes the loaded Linux hints a no-op, leading to missing
symbols, broken modules and test failures in at least NDBM_File
and ODBM_File on GNU/Hurd, as reported by Samuel Thibault in
https://bugs.debian.org/1018289 .

The replacement of eval `cat hints/linux.pl` is not very sophisticated
but should be enough for this, and alternatives seem overly verbose.

Bug-Debian: https://bugs.debian.org/1018289
  • Loading branch information
ntyni committed Sep 7, 2022
1 parent aafefcb commit 4708295
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dist/Storable/hints/gnukfreebsd.pl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
do './hints/linux.pl' or die $@;
eval `cat hints/linux.pl` or die $@;
2 changes: 1 addition & 1 deletion dist/Storable/hints/gnuknetbsd.pl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
do './hints/linux.pl' or die $@;
eval `cat hints/linux.pl` or die $@;
2 changes: 1 addition & 1 deletion ext/DynaLoader/hints/gnukfreebsd.pl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
do './hints/linux.pl' or die $@;
eval `cat hints/linux.pl` or die $@;
2 changes: 1 addition & 1 deletion ext/DynaLoader/hints/gnuknetbsd.pl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
do './hints/linux.pl' or die $@;
eval `cat hints/linux.pl` or die $@;
2 changes: 1 addition & 1 deletion ext/NDBM_File/hints/gnu.pl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
do './hints/linux.pl' or die $@;
eval `cat hints/linux.pl` or die $@;
2 changes: 1 addition & 1 deletion ext/NDBM_File/hints/gnukfreebsd.pl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
do './hints/linux.pl' or die $@;
eval `cat hints/linux.pl` or die $@;
2 changes: 1 addition & 1 deletion ext/NDBM_File/hints/gnuknetbsd.pl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
do './hints/linux.pl' or die $@;
eval `cat hints/linux.pl` or die $@;
2 changes: 1 addition & 1 deletion ext/ODBM_File/hints/gnu.pl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
do './hints/linux.pl' or die $@;
eval `cat hints/linux.pl` or die $@;
2 changes: 1 addition & 1 deletion ext/ODBM_File/hints/gnukfreebsd.pl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
do './hints/linux.pl' or die $@;
eval `cat hints/linux.pl` or die $@;
2 changes: 1 addition & 1 deletion ext/ODBM_File/hints/gnuknetbsd.pl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
do './hints/linux.pl' or die $@;
eval `cat hints/linux.pl` or die $@;
2 changes: 1 addition & 1 deletion ext/POSIX/hints/gnukfreebsd.pl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
do './hints/linux.pl' or die $@;
eval `cat hints/linux.pl` or die $@;
2 changes: 1 addition & 1 deletion ext/POSIX/hints/gnuknetbsd.pl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
do './hints/linux.pl' or die $@;
eval `cat hints/linux.pl` or die $@;

0 comments on commit 4708295

Please sign in to comment.