Skip Menu |

This queue is for tickets about the PAR-Packer CPAN distribution.

Report information
The Basics
Id: 130685
Status: resolved
Priority: 0/
Queue: PAR-Packer

People
Owner: Nobody in particular
Requestors: Frank.Lichtenheld [...] Sophos.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.049
Fixed in: (no value)



Subject: core module detection doesn't work with -Duserelocatableinc
Hi. If perl was compiled with -Duserelocatableinc then privlib and archlib are relative paths starting with ... which is the directory of the Perl executable. This breaks the detection of core modules. The following patch fixed the issue for me: diff --git a/lib/PAR/Packer.pm b/lib/PAR/Packer.pm index 74e1414..903d61e 100644 --- a/lib/PAR/Packer.pm +++ b/lib/PAR/Packer.pm @@ -823,6 +823,15 @@ sub pack_manifest_hash { (my $privlib = $Config{privlib}) =~ s{\\}{/}g; (my $archlib = $Config{archlib}) =~ s{\\}{/}g; + if($Config{userelocatableinc}){ + my $perldir = dirname($^X); + $privlib =~ s/^\.\.\./$perldir/; + $privlib = abs_path($privlib); + $self->_vprint(2, "relocatable privlib at $privlib"); + $archlib =~ s/^\.\.\./$perldir/; + $archlib = abs_path($archlib); + $self->_vprint(2, "relocatable archlib at $archlib"); + } foreach my $pfile (sort grep length $map{$_}, keys %map) { next if !$opt->{B} and ( ($map{$pfile} eq "$privlib/$pfile") or Regards, Frank
On 2019-10-10 04:37:24, Frank.Lichtenheld@Sophos.com wrote: Show quoted text
> The following patch fixed the issue for me:
Applied (after slight modification), thanx! Cheers, Roderich