[packages/perl] - set $0 for scripts executed by runperl (fixes perl.prov functionality)
qboosh
qboosh at pld-linux.org
Sat Feb 27 21:00:52 CET 2021
commit 374bc41060a47dabaf7e76ef469d4d9e880d865f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Feb 27 21:01:37 2021 +0100
- set $0 for scripts executed by runperl (fixes perl.prov functionality)
perl.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/perl.spec b/perl.spec
index 4a5dd55..c5d9279 100644
--- 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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl.git/commitdiff/374bc41060a47dabaf7e76ef469d4d9e880d865f
More information about the pld-cvs-commit
mailing list