Ignore:
Timestamp:
Aug 3, 2008, 1:20:30 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • Working patch support added to pb (tested with buffer)
  • Filtering functions now handle also pointer on hashes (such as the new pb hash)
  • Filtering functions support new macro for patch support (PBPATCHSRC and PBPATCHCMD)
  • Env.pm now generates correct templates for patch support and uses the new pb hash
  • pb_cms_export extended to support file:// URI, and also supports an undef second param (no local export available)
  • In pb, hashes now include also the arch (for better patch support)
  • pb supports local CMS based patches, as well as external references (not tested yet)
  • New pb_get_arch function provided
  • New parameters for pb_system (mayfail and quiet)
File:
1 edited

Legend:

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

    r495 r500  
    152152my $redir = "";
    153153
    154 pb_log(0,"$cmt... ");
     154pb_log(0,"$cmt... ") if ($verbose ne "quiet");
    155155pb_log(1,"Executing $cmd\n");
    156156unlink("$ENV{'PBTMP'}/system.log") if (-f "$ENV{'PBTMP'}/system.log");
     
    158158system("$cmd $redir");
    159159my $res = $?;
     160# Exit now if the command may fail
     161if ((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    }
    160166if ($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"));
    163169} 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"));
    166172} 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"));
    169175} 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"));
    172178}
    173179return($res);
Note: See TracChangeset for help on using the changeset viewer.