Changeset 503


Ignore:
Timestamp:
Aug 5, 2008, 3:12:00 PM (12 years ago)
Author:
Bruno Cornec
Message:

-Fix pb_system error msgs in case of verbose undef

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Base.pm

    r500 r503  
    152152my $redir = "";
    153153
    154 pb_log(0,"$cmt... ") if ($verbose ne "quiet");
     154pb_log(0,"$cmt... ") if ((! defined $verbose) || ($verbose ne "quiet"));
    155155pb_log(1,"Executing $cmd\n");
    156156unlink("$ENV{'PBTMP'}/system.log") if (-f "$ENV{'PBTMP'}/system.log");
     
    165165    }
    166166if ($res == -1) {
    167     pb_log(0,"failed to execute ($cmd): $!\n") if ($verbose ne "quiet");
    168     pb_display_file("$ENV{'PBTMP'}/system.log") if ((-f "$ENV{'PBTMP'}/system.log") and ($verbose ne "quiet"));
     167    pb_log(0,"failed to execute ($cmd): $!\n") if ((! defined $verbose) || ($verbose ne "quiet"));
     168    pb_display_file("$ENV{'PBTMP'}/system.log") if ((-f "$ENV{'PBTMP'}/system.log") and ((! defined $verbose) || ($verbose ne "quiet")));
    169169} elsif ($res & 127) {
    170     pb_log(0, "child ($cmd) died with signal ".($? & 127).", ".($? & 128) ? 'with' : 'without'." coredump\n") if ($verbose ne "quiet");
    171     pb_display_file("$ENV{'PBTMP'}/system.log") if ((-f "$ENV{'PBTMP'}/system.log") and ($verbose ne "quiet"));
     170    pb_log(0, "child ($cmd) died with signal ".($? & 127).", ".($? & 128) ? 'with' : 'without'." coredump\n") if ((! defined $verbose) || ($verbose ne "quiet"));
     171    pb_display_file("$ENV{'PBTMP'}/system.log") if ((-f "$ENV{'PBTMP'}/system.log") and ((! defined $verbose) || ($verbose ne "quiet")));
    172172} elsif ($res == 0) {
    173     pb_log(0,"OK\n") if ($verbose ne "quiet");
     173    pb_log(0,"OK\n") if ((! defined $verbose) || ($verbose ne "quiet"));
    174174    pb_display_file("$ENV{'PBTMP'}/system.log") if ((defined $verbose) and (-f "$ENV{'PBTMP'}/system.log") and ($verbose ne "quiet"));
    175175} else {
    176     pb_log(0, "child ($cmd) exited with value ".($? >> 8)."\n") if ($verbose ne "quiet");
    177     pb_display_file("$ENV{'PBTMP'}/system.log") if ((-f "$ENV{'PBTMP'}/system.log") and ($verbose ne "quiet"));
     176    pb_log(0, "child ($cmd) exited with value ".($? >> 8)."\n") if ((! defined $verbose) || ($verbose ne "quiet"));
     177    pb_display_file("$ENV{'PBTMP'}/system.log") if ((-f "$ENV{'PBTMP'}/system.log") and ((! defined $verbose) || ($verbose ne "quiet")));
    178178}
    179179return($res);
Note: See TracChangeset for help on using the changeset viewer.