IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 12, 2026, 2:47:49 PM (5 weeks ago)
Author:
eugene
Message:

convert the IPC::Cmd run calls to ps_run to handle inconsistent behavior between IPC:Cmd versions pre- and post-0.40

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_checkdependent.pl

    r42981 r43052  
    1515use Carp;
    1616use POSIX;
    17 use IPC::Cmd 0.36 qw( can_run run );
     17use IPC::Cmd 0.36 qw( can_run );
    1818use PS::IPP::Metadata::List qw( parse_md_list );
    19 use PS::IPP::Config qw( :standard );
     19use PS::IPP::Config qw( :standard ps_run );
    2020use PS::IPP::PStamp::RequestFile qw( :standard );
    2121use Carp;
     
    156156    if (!$no_update) {
    157157        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    158                     run(command => $command, verbose => $verbose);
     158                    ps_run(command => $command, verbose => $verbose);
    159159        unless ($success) {
    160160            my_die("failed to set pstampDependent.state to 'full' dep_id: $dep_id",
     
    312312                if (!$no_update) {
    313313                    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    314                                 run(command => $command, verbose => $verbose);
     314                                ps_run(command => $command, verbose => $verbose);
    315315                    unless ($success) {
    316316                        my_die("failed to change ${stage}Run $stage_id $component from goto_cleaned to update", $PS_EXIT_UNKNOWN_ERROR);
     
    343343            if (!$no_update) {
    344344                my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    345                             run(command => $command, verbose => $verbose);
     345                            ps_run(command => $command, verbose => $verbose);
    346346                unless ($success) {
    347347                    my_die("failed to queue ${stage}Run $stage_id $component for update", $PS_EXIT_UNKNOWN_ERROR);
     
    360360            if (!$no_update) {
    361361                my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    362                             run(command => $command, verbose => $verbose);
     362                            ps_run(command => $command, verbose => $verbose);
    363363                unless ($success) {
    364364                    my_die("failed to change ${stage}Run $stage_id $component from goto_cleaned to update", $PS_EXIT_UNKNOWN_ERROR);
     
    453453        if (!$no_update) {
    454454            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    455                         run(command => $command, verbose => $verbose);
     455                        ps_run(command => $command, verbose => $verbose);
    456456            unless ($success) {
    457457                my_die("failed to change state of ${stage}Run $stage_id from goto_cleaned to update", $PS_EXIT_UNKNOWN_ERROR);
     
    525525        if (!$no_update) {
    526526            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    527                         run(command => $command, verbose => $verbose);
     527                        ps_run(command => $command, verbose => $verbose);
    528528            unless ($success) {
    529529                my_die("failed to queue ${stage}Run $stage_id $component for update", $PS_EXIT_UNKNOWN_ERROR);
     
    539539        if (!$no_update) {
    540540            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    541                         run(command => $command, verbose => $verbose);
     541                        ps_run(command => $command, verbose => $verbose);
    542542            unless ($success) {
    543543                my_die("failed to change state of ${stage}Run $stage_id to update", $PS_EXIT_UNKNOWN_ERROR);
     
    582582        if (!$no_update) {
    583583            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    584                         run(command => $command, verbose => $verbose);
     584                        ps_run(command => $command, verbose => $verbose);
    585585            unless ($success) {
    586586                my_die("failed to queue ${stage}Run $stage_id $component for update", $PS_EXIT_UNKNOWN_ERROR);
     
    724724        if (!$no_update) {
    725725            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    726                         run(command => $command, verbose => $verbose);
     726                        ps_run(command => $command, verbose => $verbose);
    727727            unless ($success) {
    728728                my_die("failed to queue ${stage}Run $stage_id $component for update", $PS_EXIT_UNKNOWN_ERROR);
     
    737737        if (!$no_update) {
    738738            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    739                         run(command => $command, verbose => $verbose);
     739                        ps_run(command => $command, verbose => $verbose);
    740740            unless ($success) {
    741741                my_die("failed to queue ${stage}Run $stage_id $component for update", $PS_EXIT_UNKNOWN_ERROR);
     
    765765    # run the command and parse the output
    766766    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    767                 run(command => $command, verbose => $verbose);
     767                ps_run(command => $command, verbose => $verbose);
    768768    unless ($success) {
    769769        print STDERR @$stderr_buf if !$verbose;
     
    904904                    if (!$no_update) {
    905905                        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    906                             run(command => $command, verbose => $verbose);
     906                            ps_run(command => $command, verbose => $verbose);
    907907                        unless ($success) {
    908908                            my_die("failed to set destreaked component to 'update' for ${stage}Run $stage_id $c",
     
    936936    if (!$no_update) {
    937937        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    938                     run(command => $command, verbose => $verbose);
     938                    ps_run(command => $command, verbose => $verbose);
    939939        unless ($success) {
    940940            my_die("failed to set pstampJob.fault for dep_id: $dep_id",
     
    970970    if (!$no_update) {
    971971        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    972                     run(command => $command, verbose => $verbose);
     972                    ps_run(command => $command, verbose => $verbose);
    973973        unless ($success) {
    974974            carp "$cmd failed";
     
    988988    if (!$no_update) {
    989989        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    990                     run(command => $command, verbose => $verbose);
     990                    ps_run(command => $command, verbose => $verbose);
    991991        unless ($success) {
    992992            carp "$cmd failed";
Note: See TracChangeset for help on using the changeset viewer.