[lkml]   [2000]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: want tool to open RPM package on Window 95
> Somewhere floating around there is a perl version of rpm2cpio.

This is what I wrote one day a long time ago:

#!/usr/bin/perl -w
use strict;

my ($buffer, $pos, $gzmagic);
$gzmagic = "\037\213";
open OUT, "| gunzip" or die "cannot find gunzip; $!\n";
while(1) {
exit 1 unless defined($pos = read STDIN, $buffer, 8192) and $pos > 0;
next unless ($pos = index $buffer, $gzmagic) >= 0;
print OUT substr $buffer, $pos;
print OUT <STDIN>;
exit 0;

Yes, I know that I should not mix 'read' with stdio but it worked
every time I tried the above. :-)

Can we go back now to kernel issues?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:39    [W:0.032 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site