IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 9, 2011, 11:34:09 AM (15 years ago)
Author:
bills
Message:

Add special fault code PXTOOL_DO_NOT_REVERT_FAULT (value is equal to PSTAMP_GONE (26).
Components with this fault will not be reverted during update processing and will not be set to update
once cleaned.
When setting warps and diffs to be updated clear fault. chip and destreak already do this.
Deleted some code that is no longer used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/magicdstool.c

    r30313 r30544  
    11121112
    11131113    PXOPT_LOOKUP_STR(state, config->args, "-state", false, false);
     1114    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
    11141115
    11151116    psString queryFile = NULL;
     1117    bool stateIsUpdate = false;
    11161118    if (state) {
    11171119        if (! strcmp(state, "new") || !strcmp(state, "goto_restored")) {
     
    11191121        } else if (!strcmp(state, "update")) {
    11201122            queryFile = "magicdstool_revertupdated.sql";
     1123            stateIsUpdate = true;
    11211124        } else {
    11221125            psError(PXTOOLS_ERR_SYS, true, "%s is not a valid value for state", state);
     
    11411144    }
    11421145    psFree(where);
     1146
     1147    if (stateIsUpdate && !fault) {
     1148        // If fault has not been supplied, don't revert update faults with
     1149        // the magic "do not update" value
     1150        // We don't do this for new runs because then they would never complete
     1151        // quality should be used to drop bad components
     1152        psStringAppend(&query, " AND magicDSFile.fault != %d", PXTOOL_DO_NOT_REVERT_FAULT);
     1153    }
    11431154
    11441155    if (!p_psDBRunQuery(config->dbh, query)) {
     
    17441755    }
    17451756
     1757    // we do not update components with the magic fault value. They are non-updateable
     1758    // (But can be recovered with "magicdstool -revertdestreakedfile -fault 26" (PXTOOL_DO_NOT_REVERT_FAULT)
     1759    psStringAppend(&query, " AND (fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT);
     1760
    17461761    if (!p_psDBRunQueryF(config->dbh, query, setHook, magic_ds_id)) {
    17471762        psError(PS_ERR_UNKNOWN, false, "database error");
Note: See TracChangeset for help on using the changeset viewer.