From 6b032f86d902df24a9fdd76d07121d91b3571a74 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 9 Dec 2004 15:10:56 +0000 Subject: Remove external call to packdrake. --- URPM/Build.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'URPM') diff --git a/URPM/Build.pm b/URPM/Build.pm index 3d48c1d..59e46a1 100644 --- a/URPM/Build.pm +++ b/URPM/Build.pm @@ -421,15 +421,21 @@ sub build_hdlist { $ratio = $options{ratio} || 4; $split = $options{split} || 400000; - open my $fh, "| " . ($ENV{LD_LOADER} || '') . " packdrake -b${ratio}ds '$options{hdlist}' '$dir' $split"; + require Packdrakeng; + my $pack = Packdrakeng->new( + archive => $options{hdlist}, + compress => "gzip", + uncompress => "gzip -d", + block_size => $split, + comp_level => $ratio, + ) or die "Can't create archive"; foreach my $pkg (@{$urpm->{depslist}}[@idlist]) { my $filename = $pkg->fullname; "$filename.rpm" ne $pkg->filename && $pkg->filename =~ /([^\/]*)\.rpm$/ and $filename .= ":$1"; -s "$dir/$filename" or die "bad header $dir/$filename\n"; - print $fh "$filename\n"; + $pack->add($dir, $filename); } - close $fh or die "packdrake failed\n"; } #- build synthesis file. -- cgit v1.2.1