Changeset 25539 for trunk/ippScripts/scripts/chip_imfile.pl
- Timestamp:
- Sep 24, 2009, 10:36:47 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/chip_imfile.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/chip_imfile.pl
r25471 r25539 144 144 ## XXX make the feature more general? 145 145 my $useDeburnedImage = metadataLookupBool($recipeData, 'USE.DEBURNED.IMAGE'); 146 146 147 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); 152 163 153 164 ## Check the current burntool processing version: … … 200 211 } 201 212 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 } 205 237 206 238 ## We now know that we have an image that has been burntooled.
Note:
See TracChangeset
for help on using the changeset viewer.
