IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 5, 2008, 12:39:33 PM (18 years ago)
Author:
bills
Message:

cleanup and update processing for chip stage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/ipp_cleanup.pl

    r18994 r19397  
    110110        my $status = &delete_files (\@files);
    111111
    112         if (! $status)  {
    113             my $command = "$chiptool -updateimfile -chip_id $stage_id -class_id $class_id -code 1"; # Command to run
     112        if ($status)  {
     113            my $command = "$chiptool -chip_id $stage_id -class_id $class_id";
     114            if ($mode eq "goto_purged") {
     115                $command .= " -topurgedimfile";
     116            } else {
     117                $command .= " -tocleanedimfile";
     118            }
    114119            $command .= " -dbname $dbname" if defined $dbname;
    115120
     
    119124                &my_die("Unable to perform chiptool: $error_code", "chip", $stage_id, $error_code);
    120125            }
    121            
     126        } else {
     127            my $command = "$chiptool -updateimfile -chip_id $stage_id -class_id $class_id -code 1";
     128            $command .= " -dbname $dbname" if defined $dbname;
     129
     130            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose);
     131            unless ($success) {
     132                $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     133                &my_die("Unable to perform chiptool: $error_code", "chip", $stage_id, $error_code);
     134            }
    122135            $fault = 1;
    123136        }
    124137    }
     138
     139if (0) {
     140    # This block is not necessary
     141    # chiptool -tocleanedimfile and -topurgedimfile automatically update chipRun when the
     142    # last image gets set to purged or cleaned
    125143
    126144    if (! $fault) {
     
    140158        }
    141159    }
     160}
    142161    exit 0;
    143162}
Note: See TracChangeset for help on using the changeset viewer.