/[gentoo-x86]/app-arch/deb2targz/files/deb2targz-any-data.patch
Gentoo

Contents of /app-arch/deb2targz/files/deb2targz-any-data.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Sep 23 06:09:45 2011 UTC (2 years, 11 months ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Support any compression format. Keep the correct file extension. Bug 384145.

(Portage version: 2.2.0_alpha59/cvs/Linux x86_64)

1 floppym 1.1 Support any/all compression formats for data.tar
2     --- deb2targz
3     +++ deb2targz
4     @@ -47,10 +47,11 @@
5     ($header, $data) = ($data =~ /(.*?)\n(.*)/s);
6     my($name, $num1, $num2, $num3, $num4, $len) = split /\s+/, $header;
7     #print "header='$header'\n\tname='$name', len=$len\n";
8     - if ($name eq "data.tar.gz") {
9     + if ($name =~ /^data\.tar(.*)$/) {
10     # Found it
11     + my $ext = $1;
12     $data = substr($data, 0, $len);
13     - $filename =~ s/\.deb$/.tar.gz/;
14     + $filename =~ s/\.deb$/.tar$ext/;
15     my $fh = new IO::File(">$filename")
16     or die "can't write '$filename': $!";
17     print $fh $data;

  ViewVC Help
Powered by ViewVC 1.1.20