From 0513eea6b87a4ca73092bbd6a086a8b5cb6562b8 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 5 Feb 2002 16:55:42 +0000 Subject: 4.1-4mdk --- rpmtools.pm | 10 +++++----- rpmtools.spec | 6 +++++- 2 files changed, 10 insertions(+), 6 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. diff --git a/rpmtools.spec b/rpmtools.spec index 3e85092..797dccc 100644 --- a/rpmtools.spec +++ b/rpmtools.spec @@ -1,5 +1,5 @@ %define name rpmtools -%define release 3mdk +%define release 4mdk # do not modify here, see Makefile in the CVS %define version 4.1 @@ -54,6 +54,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/perl5/man/*/* %changelog +* Tue Feb 5 2002 François Pons 4.1-4mdk +- added possible fixes for using build_hdlist in specific + environment. + * Wed Jan 30 2002 François Pons 4.1-3mdk - make sure msec is installed before chkconfig for most packages except modutils and initscripts (in order to be -- cgit v1.2.1