- set $0 for scripts executed by runperl (fixes perl.prov functionality)
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 27 Feb 2021 20:01:37 +0000 (21:01 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 27 Feb 2021 20:01:37 +0000 (21:01 +0100)
perl.spec

index 4a5dd5589c03981dae1ad324ae204c8f9699dac3..c5d92796401e9720b0611b8e6a81e65fdc988711 100644 (file)
--- a/perl.spec
+++ b/perl.spec
@@ -730,7 +730,7 @@ cat > runperl <<'EOF'
 # Note: you cant use runperl -MXYZ because BEGIN is executed after -M
 LD_PRELOAD="%{_builddir}/%{name}-%{ver}/libperl.so.%{abi}" \
 PERL5LIB="%{buildroot}%{perl_privlib}:%{buildroot}%{perl_archlib}" \
-exec %{buildroot}%{_bindir}/perl -e 'BEGIN { @INC = ("%{buildroot}%{perl_privlib}", "%{buildroot}%{perl_archlib}"); }; if (@ARGV > 0) { do(shift(@ARGV)) or die "Error attempting to execute script: $@\n"; } ' \
+exec %{buildroot}%{_bindir}/perl -e 'BEGIN { @INC = ("%{buildroot}%{perl_privlib}", "%{buildroot}%{perl_archlib}"); }; if (@ARGV > 0) { my $script=shift(@ARGV); $0=$script; do($script) or die "Error attempting to execute script: $@\n"; } ' \
     ${1:+"$@"}
 EOF
 chmod a+x runperl
This page took 0.09939 seconds and 4 git commands to generate.