Skip Menu |

This queue is for tickets about the Perl-Dist-Strawberry CPAN distribution.

Report information
The Basics
Id: 120524
Status: new
Priority: 0/
Queue: Perl-Dist-Strawberry

Owner: Nobody in particular
Requestors: yurifrus [...]

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

Subject: Portable downloads
Date: Mon, 6 Mar 2017 17:31:02 +0300
To: bug-Perl-Dist-Strawberry [...]
From: Yuri <yurifrus [...]>
Download (untitled) / with headers
text/plain 1.7k
The portable.perl file apparently has lost its attributes and modification time during recent mass-patching of archival portable distributions ( and older): Filename: portable.perl Modified: Tue Dec 3 12:47:58 2013 Attributes: 100444 UNIX Size: 2661 CRC32: 311B87E6 Filename: portable.perl Modified: Mon Jan 23 19:40:12 2017 Attributes: 000666 MSDOS Size: 2638 CRC32: D95D9CF5 Could I suggest more accurate way of updating those portable zip files preserving all original attributes as well as modification time of resulting archive? perl.exe -lMArchive::Zip -e"Archive::Zip::setErrorHandler(\&CORE::die);for(@ARGV){my($z,$t)=(Archive::Zip->new,(stat)[9]);$z->read($_);my$m=$z->memberNamed('portable.perl')||next;$m->contents($m->contents=~s/^(.+)\r?\n(?=\1$)//mr);$m->desiredCompressionLevel(9);print;$z->overwrite;utime(($t)x2,$z->fileName)||die$!}" The same code expanded with printf: #!perl -l use Archive::Zip; Archive::Zip::setErrorHandler(\&CORE::die); for (@ARGV) { my ($z, $t) = (Archive::Zip->new, (stat)[9]); $z->read($_); my $m = $z->memberNamed('portable.perl') || next; $m->contents($m->contents =~ s/^(.+)\r?\n(?=\1$)//mr); $m->desiredCompressionLevel(9); print; $z->overwrite; printf "Filename:\t%s\nModified:\t%s\nAttributes:\t%06o %s\nSize:\t\t%d\nCRC32:\t\t%08X\n", $m->fileName, scalar localtime $m->lastModTime, $m->unixFileAttributes, (split /,/, 'MSDOS,,,UNIX')[$m->fileAttributeFormat], $m->uncompressedSize, $m->crc32; utime(($t)x2, $z->fileName) || die $!; } Yuri

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to