Changeset 29625 for trunk/ippScripts/scripts/magic_process.pl
- Timestamp:
- Nov 1, 2010, 12:51:37 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/magic_process.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_process.pl
r29524 r29625 325 325 } 326 326 327 ### Input result into database328 {329 my $command = "$magictool -addresult";330 $command .= " -magic_id $magic_id";331 $command .= " -node $node";332 $command .= " -path_base $outroot";333 $command .= " -dbname $dbname" if defined $dbname;334 335 # Add the processed file to the database336 unless ($no_update) {337 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =338 run(command => $command, verbose => $verbose);339 unless ($success) {340 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);341 &my_die("Unable to perform magictool -addresult: $error_code", $magic_id, $node, $error_code);342 }343 } else {344 print "Skipping command: $command\n";345 }346 }347 327 348 328 if ($node eq "root") { … … 376 356 my $exposures = $mdcParser->parse_list(join "", @$stdout_buf); 377 357 my $exp = $$exposures[0]; # Exposure of interest (should only be one) 358 if (!$exp) { 359 &my_die("magictool -exposure returned no output", $magic_id, $node, $PS_EXIT_UNKNOWN_ERROR); 360 } 378 361 379 362 $exp_id = $exp->{exp_id}; … … 429 412 unless ($success) { 430 413 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 431 # XXX: This my_die isn't going to work because the result for the root node was already432 # added to the database up above.433 # There is a magicMask has a fault column. Maybe we should434 # use that and add a new revert mode that deletes the magicMask and the magicNodeResult435 # for the root node.436 414 &my_die("Unable to perform magictool -addmask: $error_code", $magic_id, $node, $error_code); 437 415 } … … 439 417 print "Skipping command: $command\n"; 440 418 } 419 } 420 } 421 422 ### Input result into database 423 { 424 my $command = "$magictool -addresult"; 425 $command .= " -magic_id $magic_id"; 426 $command .= " -node $node"; 427 $command .= " -path_base $outroot"; 428 $command .= " -dbname $dbname" if defined $dbname; 429 430 # Add the processed file to the database 431 unless ($no_update) { 432 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 433 run(command => $command, verbose => $verbose); 434 unless ($success) { 435 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 436 # XXX: if this is the root node we need to revert delete the magicMask object 437 # inserted above 438 &my_die("Unable to perform magictool -addresult: $error_code", $magic_id, $node, $error_code); 439 } 440 } else { 441 print "Skipping command: $command\n"; 441 442 } 442 443 }
Note:
See TracChangeset
for help on using the changeset viewer.
