IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37284


Ignore:
Timestamp:
Aug 21, 2014, 7:28:09 PM (12 years ago)
Author:
eugene
Message:

sc_prepare_run works for chip

Location:
tags/ipp-pv3-20140717/ippScripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-pv3-20140717/ippScripts/Build.PL

    r37265 r37284  
    141141        scripts/sc_prepare_stack.pl
    142142        scripts/sc_prepare_warp.pl
     143        scripts/sc_prepare_run.pl
    143144        scripts/sc_remote_exec.pl
    144145        scripts/sc_retry_return.pl
  • tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_run.pl

    r37282 r37284  
    7878
    7979    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    80         run(command => $command, verbose => $verbose);
     80        run(command => $command, verbose => $verbose);
    8181    unless ($success) {
    82         $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    83        
    84         &my_die("Unable to run chiptool to determine stage parameters.", $remote_id, $error_code);
     82        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     83
     84        &my_die("Unable to run chiptool to determine stage parameters.", $remote_id, $error_code);
    8585    }
    8686    my $MDlist = $mdcParser->parse(join "", @$stdout_buf) or
    87         &my_die("Unable to determine component information.", $remote_id,$PS_EXIT_PROG_ERROR);
     87        &my_die("Unable to determine component information.", $remote_id,$PS_EXIT_PROG_ERROR);
    8888    $compData = parse_md_list($MDlist);
    8989}
     
    104104my $disk_return  = $ipprc->file_resolve($uri_return,1);
    105105
    106 my (undef, $remote_config) = uri_convert($uri_config); # Needs to be done after we've created it.
     106my %have_transfer = ();
     107my %have_check    = ();
     108my %have_config   = ();
     109my %have_generate = ();
     110my %have_return   = ();
     111
     112my (undef, $remote_config) = uri_convert($uri_config); # Needs to be done after we've created it.
    107113
    108114open(TRANSFER, ">$disk_transfer")  || &my_die("Couldn't open file? $disk_transfer",$chip_id,$PS_EXIT_SYS_ERROR);
     
    125131    open(INPUT, "$disk_transfer");
    126132    while ($line = <INPUT>) {
    127         print TRANSFER $line;
     133        unless ($have_transfer{$line}) {
     134            $have_transfer{$line} = 1;
     135            print TRANSFER $line;
     136        }
    128137    }
    129138    close (INPUT);
     
    133142    open(INPUT, "$disk_check");
    134143    while ($line = <INPUT>) {
    135         print CHECK $line;
     144        unless ($have_check{$line}) {
     145            $have_check{$line} = 1;
     146            print CHECK $line;
     147        }
    136148    }
    137149    close (INPUT);
     
    141153    open(INPUT, "$disk_config");
    142154    while ($line = <INPUT>) {
    143         print CONFIG $line;
     155        unless ($have_config{$line}) {
     156            $have_config{$line} = 1;
     157            print CONFIG $line;
     158        }
    144159    }
    145160    close (INPUT);
     
    149164    open(INPUT, "$disk_generate");
    150165    while ($line = <INPUT>) {
    151         print GENERATE $line;
     166        unless ($have_generate{$line}) {
     167            $have_generate{$line} = 1;
     168            print GENERATE $line;
     169        }
    152170    }
    153171    close (INPUT);
     
    157175    open(INPUT, "$disk_return");
    158176    while ($line = <INPUT>) {
    159         print RETURN $line;
     177        unless ($have_return{$line}) {
     178            $have_return{$line} = 1;
     179            print RETURN $line;
     180        }
    160181    }
    161182    close (INPUT);
     
    223244    my $ipp_disk= $ipprc->file_resolve( $neb_uri );
    224245    my $remote_disk = $ipp_disk;
    225    
     246
    226247    unless(defined($ipp_disk)) {
    227         my_die();
     248        my_die();
    228249    }
    229250
     
    244265
    245266    carp($msg);
    246    
     267
    247268    if (defined $id and not $no_update) {
    248         my $command = "remotetool -updaterun -remote_id $id";
    249         $command .= " -fault $exit_code " if defined $exit_code;
    250         $command .= " -set_state $exit_state " if defined $exit_state;
    251         $command .= " -dbname $dbname " if defined $dbname;
    252 
    253         system($command);
     269        my $command = "remotetool -updaterun -remote_id $id";
     270        $command .= " -fault $exit_code " if defined $exit_code;
     271        $command .= " -set_state $exit_state " if defined $exit_state;
     272        $command .= " -dbname $dbname " if defined $dbname;
     273
     274        system($command);
    254275    }
    255276
Note: See TracChangeset for help on using the changeset viewer.