aboutsummaryrefslogtreecommitdiffstats
path: root/URPM/Build.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-12-09 15:10:56 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-12-09 15:10:56 +0000
commit6b032f86d902df24a9fdd76d07121d91b3571a74 (patch)
tree83d328e57cea13b86bbdd5f8e7cdd7440f3a8713 /URPM/Build.pm
parent444e449aaf670737099e92adc2e26cb8f3787ae7 (diff)
downloadperl-URPM-6b032f86d902df24a9fdd76d07121d91b3571a74.tar
perl-URPM-6b032f86d902df24a9fdd76d07121d91b3571a74.tar.gz
perl-URPM-6b032f86d902df24a9fdd76d07121d91b3571a74.tar.bz2
perl-URPM-6b032f86d902df24a9fdd76d07121d91b3571a74.tar.xz
perl-URPM-6b032f86d902df24a9fdd76d07121d91b3571a74.zip
Remove external call to packdrake.
Diffstat (limited to 'URPM/Build.pm')
-rw-r--r--URPM/Build.pm12
1 files changed, 9 insertions, 3 deletions
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.