IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25539


Ignore:
Timestamp:
Sep 24, 2009, 10:36:47 AM (17 years ago)
Author:
watersc1
Message:

Modifications to allow optional use of old versions of burntool.

Location:
trunk
Files:
2 edited

Legend:

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

    r25471 r25539  
    144144    ## XXX make the feature more general?
    145145    my $useDeburnedImage = metadataLookupBool($recipeData, 'USE.DEBURNED.IMAGE');
     146
    146147    if ($useDeburnedImage) {
    147         ## Check that we have required programs:
    148 #       print STDERR "Inside burntool loop!\n";
    149         my $regtool  = can_run('regtool') or &my_die ("Can't find regtool", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
    150         my $funpack  = can_run('funpack') or &my_die ("Can't find funpack", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
    151         my $burntool = can_run('burntool') or &my_die ("Can't find burntool", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
     148        my $useBestBurntool  = metadataLookupBool($recipeData, 'USE.BEST.BURNTOOL');
     149
     150        ## Check that we have required programs:
     151#       print STDERR "Inside burntool loop!\n";
     152        my $regtool  = can_run('regtool') or &my_die ("Can't find regtool", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
     153        my $funpack  = can_run('funpack') or &my_die ("Can't find funpack", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
     154        my $burntool = can_run('burntool') or &my_die ("Can't find burntool", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
     155       
     156        ## Check the current burntool processing version:
     157        my $regtool_state_cmd = "$regtool -processedimfile -exp_id $exp_id -class_id $class_id -limit 1";
     158        if (defined($dbname)) {
     159            $regtool_state_cmd .= " -dbname $dbname";
     160        }
     161        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     162            run(command => $regtool_state_cmd, verbose => $verbose);
    152163
    153164        ## Check the current burntool processing version:
     
    200211        }
    201212
    202         if (abs($burntoolState) != $burntoolStateGood) {
    203             &my_die("Image burntool version does not match current accepted version.", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
    204         }
     213        if (abs($burntoolState) != $burntoolStateGood) {
     214            if ($useBestBurntool) {
     215                &my_die("Image burntool version does not match current accepted version.", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
     216            }
     217            else {
     218                warn ("Image burntool version does not match current accepted version. Continuing as requested.");
     219                # Internally pretend that we're at a good version.
     220                if ($burntoolState < -10) {
     221                    $burntoolState = -1 * $burntoolStateGood;
     222                }
     223                elsif ($burntoolState > 10) {
     224                    $burntoolState = $burntoolStateGood;
     225                }
     226                elsif ($burntoolState == 0) {
     227                    # You've told me to use a deburned image, and that you don't care if it's the most recent. The database has told me
     228                    # that burntool has never been run on this image. We'll hope the database is wrong, but I don't really trust that.
     229                    warn ("burntool_state suggests no table will be found. This will likely crash.");
     230                    $burntoolState = -1 * $burntoolStateGood;
     231                }
     232                else {
     233                    &my_die("No valid burntool table will be found.", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
     234                }
     235            }
     236        }
    205237
    206238        ## We now know that we have an image that has been burntooled.
  • trunk/ippconfig/recipes/ppImage.config

    r25474 r25539  
    2626CHECK.CTE          BOOL    FALSE           # measure CTE errors?
    2727USE.DEBURNED.IMAGE BOOL    FALSE           # use burntool-repaired image?
     28USE.BEST.BURNTOOL  BOOL    TRUE            # require the best burntooled data
    2829TILTYSTREAK.APPLY  BOOL    FALSE           # apply the 'tiltystreak' tool
    2930
Note: See TracChangeset for help on using the changeset viewer.