[rt.cpan.org #132067] fix for Archive::Zip related test failures due to symlinks
1 view
Skip to first unread message
Shawn Laffan via RT
unread,
Mar 5, 2020, 6:00:02 PM3/5/20
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to p...@perl.org
Thu Mar 05 17:43:33 2020: Request 132067 was acted upon.
Transaction: Ticket created by SLAFFAN
Queue: PAR-Dist
Subject: fix for Archive::Zip related test failures due to symlinks
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: SLA...@cpan.org Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=132067 >
Many of the current CPAN test failures have this error text (links below):
error: Could not extract /tmp/par4D_mq/blib/META.yml safely: /tmp is an existing symbolic link
One simple fix is to ensure _unzip_to_tmpdir (or perhaps _unzip) uses a path with symlinks resolved.
For example in _unzip_to_tmpdir:
...
my $path = $tmpdir;
$path = File::Spec->catdir($tmpdir, $args{subdir}) if defined $args{subdir};
### add these two lines
require Cwd;
$path = Cwd::realpath($path);
_unzip(dist => $dist, path => $path);
...
Tested on macos 10.15.
Let me know if you'd prefer a patch file, and whether it should be in _unzip_to_tmpdir or more localised within _unzip.