Skip Menu |

This queue is for tickets about the cpan2rpm CPAN distribution.

Report information
The Basics
Id: 12056
Status: resolved
Priority: 0/
Queue: cpan2rpm

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

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



Subject: Non POSIX compliant use of "head" and "tail"
cpan2rpm 2.027 uses "head -1" and "tail -1" which are not POSIX compliant, and will fail with GNU coreutils 5.3.0. Fix attached.
--- cpan2rpm~ 2005-02-07 19:25:27.000000000 +0200 +++ cpan2rpm 2005-03-29 21:39:27.000000000 +0300 @@ -1254,8 +1254,8 @@ system("chmod", "-R", "u+w", $dst); my $cmd = $zip - ? "unzip -l $_ | grep -P -o '\\S+/\$' |tail -1" - : "tar -t${z}vf $_ |head -1" + ? "unzip -l $_ | grep -P -o '\\S+/\$' |tail -n 1" + : "tar -t${z}vf $_ |head -n 1" ; chomp($_ = qx/$cmd/);
sorry for long delay. patch will be applied to upcoming 2.029 release.