From 10bf81fb33adf67f05d6744e4edc7ec0dbd9abba Mon Sep 17 00:00:00 2001 From: Mihaela Kedikova Date: Mon, 22 Mar 2010 11:17:10 +0100 Subject: [PATCH] recent changes for grid control --- solenv/bin/build.pl | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 5b4d4622754a..84df7ca04f38 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -2292,24 +2292,20 @@ sub is_output_tree { }; return ''; }; - sub get_tmp_dir { my $tmp_dir; - if( defined($ENV{TMPDIR}) ) { - $tmp_dir = $ENV{TMPDIR} . '/'; - } elsif( defined($ENV{TMP}) ) { + if( defined($ENV{TMP}) ) { $tmp_dir = $ENV{TMP} . '/'; } else { $tmp_dir = '/tmp/'; } - $tmp_dir = tempdir ( DIR => $tmp_dir ); - if (!-d $tmp_dir) { - print_error("Cannot create temporary directory for checkout in $tmp_dir") if ($@); - }; + $tmp_dir .= $$ while (-e $tmp_dir); + $tmp_dir = CorrectPath($tmp_dir); + eval {mkpath($tmp_dir)}; + print_error("Cannot create temporary directory in $tmp_dir") if ($@); return $tmp_dir; }; - sub retrieve_build_list { my $module = shift; my $old_fh = select(STDOUT);