IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 22751


Ignore:
Timestamp:
Mar 2, 2009, 6:07:30 PM (17 years ago)
Author:
eugene
Message:

adding goto_scrubbed mode to chiptool

Location:
trunk/ippTools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/chiptool_pendingcleanupimfile.sql

    r19527 r22751  
    1515    ((chipRun.state = 'goto_cleaned' AND chipProcessedImfile.data_state = 'full')
    1616OR
     17    (chipRun.state = 'goto_scrubbed' AND chipProcessedImfile.data_state = 'full')
     18OR
    1719    (chipRun.state = 'goto_purged' AND chipProcessedImfile.data_state != 'purged'))
  • trunk/ippTools/share/chiptool_pendingcleanuprun.sql

    r19527 r22751  
    77USING (exp_id)
    88WHERE
    9     (chipRun.state = 'goto_cleaned' OR chipRun.state = 'goto_purged')
     9    (chipRun.state = 'goto_cleaned' OR chipRun.state = 'goto_scrubbed' OR chipRun.state = 'goto_purged')
  • trunk/ippTools/src/chiptool.c

    r21521 r22751  
    5252static bool runMode(pxConfig *config);
    5353static bool tocleanedimfileMode(pxConfig *config);
     54static bool tocleanedimfile_from_scrubbedMode(pxConfig *config);
    5455static bool tofullimfileMode(pxConfig *config);
    5556static bool topurgedimfileMode(pxConfig *config);
     
    9192        MODECASE(CHIPTOOL_MODE_RUN,                     runMode);
    9293        MODECASE(CHIPTOOL_MODE_TOCLEANEDIMFILE,         tocleanedimfileMode);
     94        MODECASE(CHIPTOOL_MODE_TOCLEANEDIMFILE_FROM_SCRUBBED, tocleanedimfile_from_scrubbedMode);
    9395        MODECASE(CHIPTOOL_MODE_TOFULLIMFILE,            tofullimfileMode);
    9496        MODECASE(CHIPTOOL_MODE_TOPURGEDIMFILE,          topurgedimfileMode);
     
    12451247    return change_imfile_data_state(config, "cleaned", "goto_cleaned");
    12461248}
     1249static bool tocleanedimfile_from_scrubbedMode(pxConfig *config)
     1250{
     1251    return change_imfile_data_state(config, "cleaned", "goto_scrubbed");
     1252}
    12471253static bool tofullimfileMode(pxConfig *config)
    12481254{
  • trunk/ippTools/src/chiptool.h

    r21521 r22751  
    4343    CHIPTOOL_MODE_RUN,
    4444    CHIPTOOL_MODE_TOCLEANEDIMFILE,
     45    CHIPTOOL_MODE_TOCLEANEDIMFILE_FROM_SCRUBBED,
    4546    CHIPTOOL_MODE_TOFULLIMFILE,
    4647    CHIPTOOL_MODE_TOPURGEDIMFILE,
  • trunk/ippTools/src/chiptoolConfig.c

    r21521 r22751  
    234234    psMetadataAddStr(tocleanedimfileArgs, PS_LIST_TAIL, "-class_id",  0,        "class ID to update", NULL);
    235235
     236    // -tocleanedimfile_from_scrubbed
     237    psMetadata *tocleanedimfile_from_scrubbedArgs = psMetadataAlloc();
     238    psMetadataAddS64(tocleanedimfile_from_scrubbedArgs, PS_LIST_TAIL, "-chip_id", 0,          "chip ID to update", 0);
     239    psMetadataAddStr(tocleanedimfile_from_scrubbedArgs, PS_LIST_TAIL, "-class_id",  0,        "class ID to update", NULL);
     240
    236241    // -tofullimfile
    237242    psMetadata *tofullimfileArgs = psMetadataAlloc();
     
    275280    PXOPT_ADD_MODE("-run",                  "show runs",                            CHIPTOOL_MODE_RUN,                  runArgs);
    276281    PXOPT_ADD_MODE("-tocleanedimfile",      "set imfile state to cleaned",          CHIPTOOL_MODE_TOCLEANEDIMFILE,      tocleanedimfileArgs);
     282    PXOPT_ADD_MODE("-tocleanedimfile_from_scrubbed", "set imfile state to cleaned (for goto_scrubbed)", CHIPTOOL_MODE_TOCLEANEDIMFILE_FROM_SCRUBBED, tocleanedimfile_from_scrubbedArgs);
    277283    PXOPT_ADD_MODE("-tofullimfile",         "set imfile state to full",              CHIPTOOL_MODE_TOFULLIMFILE,         tofullimfileArgs);
    278284    PXOPT_ADD_MODE("-topurgedimfile",       "set imfile state to purged",            CHIPTOOL_MODE_TOPURGEDIMFILE,       topurgedimfileArgs);
  • trunk/ippTools/src/pxtools.c

    r20413 r22751  
    3030    PS_ASSERT_PTR_NON_NULL(state, false);
    3131   
    32     // XXX replace strncmp with strcmp
    33 
    3432    if (!strcmp(state, "new")) return true;
    3533    if (!strcmp(state, "reg")) return true;
     
    3836    if (!strcmp(state, "wait")) return true;
    3937    if (!strcmp(state, "goto_cleaned")) return true;
     38    if (!strcmp(state, "goto_scrubbed")) return true;
    4039    if (!strcmp(state, "cleaned")) return true;
    4140    if (!strcmp(state, "update")) return true;
     
    4544    return false;
    4645}
     46
     47// goto_scrubbed is similar to cleaned, but allows files to be removed even if the config
     48// files is missing
Note: See TracChangeset for help on using the changeset viewer.