Skip Menu |

This queue is for tickets about the IO-Zlib CPAN distribution.

Report information
The Basics
Id: 90214
Status: resolved
Priority: 0/
Queue: IO-Zlib

People
Owner: Nobody in particular
Requestors: fraserbn [...] gmail.com
Cc:
AdminCc:

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



Subject: Use android-compatible flags when calling gzip
On some android devices/versions, gzip won't take compound flags ala '-dc', but it'll happily accept them separately. (I filed similar reports with Archive::Extract and CPAN::Tarzip) diff --git a/cpan/IO-Zlib/Zlib.pm b/cpan/IO-Zlib/Zlib.pm index 55534b4..32f523c 100644 --- a/cpan/IO-Zlib/Zlib.pm +++ b/cpan/IO-Zlib/Zlib.pm @@ -155,7 +155,7 @@ Not yet supported. If the external F<gzip> is used, the following C<open>s are used: - open(FH, "gzip -dc $filename |") # for read opens + open(FH, "gzip -d -c $filename |") # for read opens open(FH, " | gzip > $filename") # for write opens You can modify the 'commands' for example to hardwire @@ -307,7 +307,7 @@ use Symbol; use Tie::Handle; # These might use some $^O logic. -my $gzip_read_open = "gzip -dc %s |"; +my $gzip_read_open = "gzip -d -c %s |"; my $gzip_write_open = "| gzip > %s"; my $gzip_external;
Sounds like a bug in those android gzip builds to me, not a bug in IO::Zlib.
From: fraserbn [...] gmail.com
On Sun Nov 10 16:33:06 2013, TOMHUGHES wrote: Show quoted text
> Sounds like a bug in those android gzip builds to me, not a bug in IO::Zlib.
I'm going to have to ask you to reconsider. These types of modules are supposed to abstract users from the peculiarities of the OS they are running from -- it seems counterintuitive to reject a patch because the OS is doing something weird. Additionally, consider that IO::Zlib is part of the core's toolchain, and if it doesn't support Android-style flags, then *perl can't build cleanly on android*. If you still won't change the module, then please change the status of the ticket to rejected, not resolved.
Well using gzip is only a fallback path anyway - if IO::Zlib has been built properly then it should use the linked to libz library directly.