Changeset 30529
- Timestamp:
- Feb 8, 2011, 5:59:17 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_job_run.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_job_run.pl
r30528 r30529 14 14 use File::Basename; 15 15 use File::Copy; 16 use File::Temp qw(tempfile );16 use File::Temp qw(tempfile tempdir); 17 17 use Digest::MD5::File qw( file_md5_hex ); 18 18 use PS::IPP::PStamp::RequestFile qw( :standard ); … … 155 155 # Try and replace the streaks from the recovery images 156 156 157 @file_list = (); 158 $tmproot = "$outdir/$job_id"; 159 if (! -e $tmproot) { 160 mkdir $tmproot or 161 my_die( "failed to create temporary directory $tmproot", $job_id, $PS_EXIT_UNKNOWN_ERROR); 162 } 157 my $temp_dir = metadataLookupStr($ipprc->{_siteConfig}, "TEMP.DIR") or &my_die("Unable to find temporary directory in site configuration", $job_id, $PS_EXIT_CONFIG_ERROR); 158 $tmproot = tempdir("$temp_dir/psjob.$job_id.XXXX", CLEANUP => !$save_temps); 163 159 my $muggle_command = "$streaksreplace -stage $stage -tmproot $tmproot"; 164 160 # find the "directory" of the input path_base … … 166 162 my $base = basename($image); 167 163 $tmpImage = "$tmproot/$base"; 164 165 @file_list = (); 168 166 169 167 # XXX: We should get the recovery_path_base from the magicDSFile but that requires a bunch of file rule and … … 231 229 } 232 230 233 if (!$save_temps) {234 unlink $tmpImage if $tmpImage;235 unlink $tmpMask if $tmpMask;236 unlink $tmpVariance if $tmpVariance;237 rmdir $tmproot if $tmproot;238 }239 240 231 if ($exitStatus == 0) { 241 232 my $reglist = "$outdir/reglist$job_id";
Note:
See TracChangeset
for help on using the changeset viewer.
