From b03f9a8c3c694ab3615e074957d9e4d6aa1d8394 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 14 Mar 2005 12:47:05 +0000 Subject: Build hdlists in temporary locations --- gendistrib | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gendistrib') diff --git a/gendistrib b/gendistrib index cd88219..cd4404c 100755 --- a/gendistrib +++ b/gendistrib @@ -28,7 +28,8 @@ use Getopt::Long; use Distribconf::Build; my $urpm = new URPM; -my $headers_dir = (-d $ENV{TMPDIR} ? $ENV{TMPDIR} : -d "$ENV{HOME}/tmp" ? "$ENV{HOME}/tmp" : "/tmp") . "/.build_hdlist"; +my $tempdir = -d $ENV{TMPDIR} ? $ENV{TMPDIR} : -d "$ENV{HOME}/tmp" ? "$ENV{HOME}/tmp" : "/tmp"; +my $headers_dir = $tempdir . "/.build_hdlist"; sub usage { print STDERR <unresolved_provides_clean; +#- temporary file where to build hdlists +my $temp_hdlist = $tempdir . '/hdlist' . $$; foreach (0..$#hdlists) { my $e = $hdlists[$_]; @@ -195,11 +198,13 @@ foreach (0..$#hdlists) { $urpm->compute_deps; print STDERR qq(building hdlist for medium "$e->{descr}"\n) unless $nooutput; + unlink $temp_hdlist; $urpm->build_hdlist(start => $start, end => $end, dir => $headers_dir, - hdlist => $e->{hdlist}, + hdlist => $temp_hdlist, ratio => 9); + system('/bin/mv', $temp_hdlist, $e->{hdlist}); print STDERR qq(building synthesis for medium "$e->{descr}"\n) unless $nooutput; $urpm->build_synthesis(start => $start, -- cgit v1.2.1