aboutsummaryrefslogtreecommitdiffstats
path: root/Packdrakeng.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-04-04 15:31:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-04-04 15:31:54 +0000
commit0bad992b302944a6a5b51faf6a73bf6b3d6bb613 (patch)
tree36cd1eb1a3879ed85e78ca7d763d902f83fe366c /Packdrakeng.pm
parent9c6fe669a31d9d78fd3d19db0bd2fcedf808a7d5 (diff)
downloadrpmtools-0bad992b302944a6a5b51faf6a73bf6b3d6bb613.tar
rpmtools-0bad992b302944a6a5b51faf6a73bf6b3d6bb613.tar.gz
rpmtools-0bad992b302944a6a5b51faf6a73bf6b3d6bb613.tar.bz2
rpmtools-0bad992b302944a6a5b51faf6a73bf6b3d6bb613.tar.xz
rpmtools-0bad992b302944a6a5b51faf6a73bf6b3d6bb613.zip
packdrake: remove dirty message when decompressing without Compress::Zlib5.0.20
Diffstat (limited to 'Packdrakeng.pm')
-rw-r--r--Packdrakeng.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/Packdrakeng.pm b/Packdrakeng.pm
index 38ff2d8..f46c2b6 100644
--- a/Packdrakeng.pm
+++ b/Packdrakeng.pm
@@ -398,7 +398,10 @@ sub extern_uncompress {
}
close($tempfh);
- CORE::open($pack->{ustream_data}{handle}, "cat '$pack->{ustream_data}{tempname}' | $pack->{uncompress_method} |") or do {
+ my $cmd = $pack->{uncompress_method} eq 'gzip -d' || $pack->{uncompress_method} eq 'bzip2 -d' ?
+ "$pack->{uncompress_method} -c '$pack->{ustream_data}{tempname}'" :
+ "$pack->{uncompress_method} < '$pack->{ustream_data}{tempname}'";
+ CORE::open($pack->{ustream_data}{handle}, "$cmd |") or do {
$pack->{log}("Can't start $pack->{uncompress_method} to uncompress data");
unlink($pack->{ustream_data}{tempname});
$pack->{ustream_data} = undef;