recent changes for grid control

This commit is contained in:
Mihaela Kedikova 2010-03-22 11:17:10 +01:00
parent e13a74bf91
commit 10bf81fb33

View file

@ -2292,24 +2292,20 @@ sub is_output_tree {
}; };
return ''; return '';
}; };
sub get_tmp_dir { sub get_tmp_dir {
my $tmp_dir; my $tmp_dir;
if( defined($ENV{TMPDIR}) ) { if( defined($ENV{TMP}) ) {
$tmp_dir = $ENV{TMPDIR} . '/';
} elsif( defined($ENV{TMP}) ) {
$tmp_dir = $ENV{TMP} . '/'; $tmp_dir = $ENV{TMP} . '/';
} else { } else {
$tmp_dir = '/tmp/'; $tmp_dir = '/tmp/';
} }
$tmp_dir = tempdir ( DIR => $tmp_dir ); $tmp_dir .= $$ while (-e $tmp_dir);
if (!-d $tmp_dir) { $tmp_dir = CorrectPath($tmp_dir);
print_error("Cannot create temporary directory for checkout in $tmp_dir") if ($@); eval {mkpath($tmp_dir)};
}; print_error("Cannot create temporary directory in $tmp_dir") if ($@);
return $tmp_dir; return $tmp_dir;
}; };
sub retrieve_build_list { sub retrieve_build_list {
my $module = shift; my $module = shift;
my $old_fh = select(STDOUT); my $old_fh = select(STDOUT);