Changeset 500 in ProjectBuilder for devel/pb-modules
- Timestamp:
- Aug 3, 2008, 1:20:30 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Base.pm
r495 r500 152 152 my $redir = ""; 153 153 154 pb_log(0,"$cmt... ") ;154 pb_log(0,"$cmt... ") if ($verbose ne "quiet"); 155 155 pb_log(1,"Executing $cmd\n"); 156 156 unlink("$ENV{'PBTMP'}/system.log") if (-f "$ENV{'PBTMP'}/system.log"); … … 158 158 system("$cmd $redir"); 159 159 my $res = $?; 160 # Exit now if the command may fail 161 if ((defined $verbose) and ($verbose eq "mayfail")) { 162 pb_log(0,"N/A\n") if ($res != 0); 163 pb_log(0,"OK\n") if ($res == 0); 164 return($res) 165 } 160 166 if ($res == -1) { 161 pb_log(0,"failed to execute ($cmd): $!\n") ;162 pb_display_file("$ENV{'PBTMP'}/system.log") if ( -f "$ENV{'PBTMP'}/system.log");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")); 163 169 } elsif ($res & 127) { 164 pb_log(0, "child ($cmd) died with signal ".($? & 127).", ".($? & 128) ? 'with' : 'without'." coredump\n") ;165 pb_display_file("$ENV{'PBTMP'}/system.log") if ( -f "$ENV{'PBTMP'}/system.log");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")); 166 172 } elsif ($res == 0) { 167 pb_log(0,"OK\n") ;168 pb_display_file("$ENV{'PBTMP'}/system.log") if ((defined $verbose) && (-f "$ENV{'PBTMP'}/system.log"));173 pb_log(0,"OK\n") if ($verbose ne "quiet"); 174 pb_display_file("$ENV{'PBTMP'}/system.log") if ((defined $verbose) and (-f "$ENV{'PBTMP'}/system.log") and ($verbose ne "quiet")); 169 175 } else { 170 pb_log(0, "child ($cmd) exited with value ".($? >> 8)."\n") ;171 pb_display_file("$ENV{'PBTMP'}/system.log") if ( -f "$ENV{'PBTMP'}/system.log");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")); 172 178 } 173 179 return($res);
Note:
See TracChangeset
for help on using the changeset viewer.