aboutsummaryrefslogtreecommitdiffstats
path: root/rpmtools.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-02-05 16:55:42 +0000
committerFrancois Pons <fpons@mandriva.com>2002-02-05 16:55:42 +0000
commit0513eea6b87a4ca73092bbd6a086a8b5cb6562b8 (patch)
tree92260ffc066d8d89d0b7122fc4a4960aa599d3a0 /rpmtools.pm
parentfcfd7c7c73ca1c5e40895fe3934e758ed84f198e (diff)
downloadrpmtools-0513eea6b87a4ca73092bbd6a086a8b5cb6562b8.tar
rpmtools-0513eea6b87a4ca73092bbd6a086a8b5cb6562b8.tar.gz
rpmtools-0513eea6b87a4ca73092bbd6a086a8b5cb6562b8.tar.bz2
rpmtools-0513eea6b87a4ca73092bbd6a086a8b5cb6562b8.tar.xz
rpmtools-0513eea6b87a4ca73092bbd6a086a8b5cb6562b8.zip
4.1-4mdk
Diffstat (limited to 'rpmtools.pm')
-rw-r--r--rpmtools.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/rpmtools.pm b/rpmtools.pm
index adcdcc2..a5e4ebf 100644
--- a/rpmtools.pm
+++ b/rpmtools.pm
@@ -170,14 +170,14 @@ sub build_hdlist {
my ($key) = /([^\/]*)\.rpm$/ or next; #- get rpm filename.
unless (-s "$dir/$key") {
- system("rpm2header '$_' > '$dir/$key'");
+ system("$ENV{LD_LOADER} rpm2header '$_' > '$dir/$key'");
$? == 0 or unlink("$dir/$key"), die "bad rpm $_\n";
}
-s "$dir/$key" or unlink("$dir/$key"), die "bad rpm $_\n";
my ($name, $version, $release, $arch) = $key =~ /(.*)-([^-]*)-([^-]*)\.([^\.]*)$/;
- my ($realname, $realversion, $realrelease, $realarch) =
- `parsehdlist --raw --name '$dir/$key'` =~ /:name:([^\:]*)-([^\:\-]*)-([^\:\-]*)\.([^\-\.\:\s]*)(?::.*\.rpm)?$/;
+ my ($realname, $realversion, $realrelease, $realarch) = `$ENV{LD_LOADER} parsehdlist --raw --name '$dir/$key'` =~
+ /:name:([^\:]*)-([^\:\-]*)-([^\:\-]*)\.([^\-\.\:\s]*)(?::.*\.rpm)?$/;
unless (length($name) && length($version) && length($release) && length($arch) &&
$name eq $realname && $version eq $realversion && $release eq $realrelease && $arch eq $realarch) {
my $newkey = "$realname-$realversion-$realrelease.$realarch:$key";
@@ -195,7 +195,7 @@ sub build_hdlist {
#- 5 9.5 sec 8.20Mb
#- 4 8.6 sec 8.30Mb -> good for urpmi
#- 3 7.6 sec 8.60Mb
- open B, "| packdrake -b${ratio}ds '$hdlist' '$dir' 400000";
+ open B, "| $ENV{LD_LOADER} packdrake -b${ratio}ds '$hdlist' '$dir' 400000";
foreach (@{$params->{depslist}}) {
if (my $keys = delete $names{$_->{name}}) {
print B "$_\n" foreach @$keys;
@@ -206,7 +206,7 @@ sub build_hdlist {
}
close B or die "packdrake failed\n";
- system("rm", "-rf", $dir) unless $dir eq '.' || $noclean;
+ system(($ENV{LD_LOADER} ? ($ENV{LD_LOADER}) : ()), "rm", "-rf", $dir) unless $dir eq '.' || $noclean;
}
#- read one or more rpm files.