Changeset 32477
- Timestamp:
- Oct 3, 2011, 3:44:35 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/chip_imfile.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/chip_imfile.pl
r32374 r32477 34 34 my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1); 35 35 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1); 36 my $nebrepair = can_run('neb-repair') or (warn "Can't find neb-repair" and $missing_tools = 1); 37 36 38 if ($missing_tools) { 37 39 warn("Can't find required tools."); … … 330 332 # get the UNIX version of the (possible) neb: or path: filename 331 333 my $uriReal = $ipprc->file_resolve( $uri ); 334 # Catch errors here 335 if (!$uriReal) { 336 my $repair_cmd = "$nebrepair $uri"; 337 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose); 338 unless ($repair_success) { 339 &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR); 340 } 341 $uriReal = $ipprc->file_resolve( $uri ); 342 } 343 332 344 &my_die("Unable to resolve $uri on $host", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) if !$uriReal; 333 345 … … 336 348 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $funpack_cmd, verbose => $verbose); 337 349 unless ($success) { 350 # Catch errors here 351 my $repair_cmd = "$nebrepair $uri"; 352 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose); 353 unless ($repair_success) { 354 &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR); 355 } 356 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $funpack_cmd, verbose => $verbose); 357 } 358 unless ($success) { 338 359 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 339 360 &my_die("Unable to perform funpack: $error_code", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR); … … 348 369 $burntoolTable_uri =~ s/fits$/burn.tbl/; 349 370 $burntoolTable_uriReal = $ipprc->file_resolve( $burntoolTable_uri ); 371 if (!$burntoolTable_uriReal) { 372 my $repair_cmd = "$nebrepair $burntoolTable_uri"; 373 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose); 374 unless ($repair_success) { 375 &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR); 376 } 377 $burntoolTable_uriReal = $ipprc->file_resolve( $burntoolTable_uri ); 378 } 350 379 unless ($ipprc->file_exists($burntoolTable_uri)) { 380 # Catch errors here 351 381 &my_die("Couldn't find burntool table: $burntoolTable_uri",$exp_id,$chip_id,$class_id, $PS_EXIT_SYS_ERROR); 352 382 }
Note:
See TracChangeset
for help on using the changeset viewer.
