diff options
author | Francois Pons <fpons@mandriva.com> | 2002-01-09 16:32:53 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-01-09 16:32:53 +0000 |
commit | 4947fe32029d356b78a8815ccfa658ca4b8636c2 (patch) | |
tree | 1ee5756304939af9c5d683f94c54aa807addaf9f /rpmtools.pm | |
parent | 2c249e7946fb4c3f4013aabe36ec1097abc02d8a (diff) | |
download | rpmtools-4947fe32029d356b78a8815ccfa658ca4b8636c2.tar rpmtools-4947fe32029d356b78a8815ccfa658ca4b8636c2.tar.gz rpmtools-4947fe32029d356b78a8815ccfa658ca4b8636c2.tar.bz2 rpmtools-4947fe32029d356b78a8815ccfa658ca4b8636c2.tar.xz rpmtools-4947fe32029d356b78a8815ccfa658ca4b8636c2.zip |
first snapshot candidate for first alpha of 8.2.4.0.2
Diffstat (limited to 'rpmtools.pm')
-rw-r--r-- | rpmtools.pm | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/rpmtools.pm b/rpmtools.pm index a67b3bf..c525888 100644 --- a/rpmtools.pm +++ b/rpmtools.pm @@ -113,23 +113,30 @@ sub read_hdlists { my ($params, @hdlists) = @_; my @names; - local (*I, *O); pipe I, O; - if (my $pid = fork()) { - close O; + foreach my $hdlist (@hdlists) { + local (*I, *O); pipe I, O; + if (my $pid = fork()) { + close O; - push @names, rpmtools::_parse_(fileno *I, $params->{flags}, $params->{info}, $params->{provides}); + push @names, rpmtools::_parse_(fileno *I, $params->{flags}, $params->{info}, $params->{provides}); - close I; - waitpid $pid, 0; - } else { - close I; - open STDOUT, ">&O" or die "unable to redirect output"; + close I; + waitpid $pid, 0; + } else { + close I; + open STDIN, "<$hdlist" or die "unable to open archive $hdlist"; + open STDOUT, ">&O" or die "unable to redirect output"; + open STDERR, ">/dev/null" or die "unable to open /dev/null"; + + require packdrake; + my $packer = new packdrake; - require packdrake; - packdrake::cat_archive(@hdlists); + $packer->read_toc_trailer($_); - close O; - exit 0; + exec (($ENV{LD_LOADER} ? ($ENV{LD_LOADER}) : ()), split " ", $packer->{uncompress}); + + die "unable to cat the archive with $packer->{uncompress}"; + } } @names; } |