Changeset 1120


Ignore:
Timestamp:
Dec 4, 2010, 2:46:48 AM (9 years ago)
Author:
bruno
Message:
  • remove the test on the '>' char in pb_stsem as there are too many false positive. Use "noredir" in pbinit of website instead.
  • Adds support for -t option to prepare a builbot or similar interface.
Files:
3 edited

Legend:

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

    r1115 r1120  
    148148unlink("$ENV{'PBTMP'}/system.log") if (-f "$ENV{'PBTMP'}/system.log");
    149149$redir = "2>> $ENV{'PBTMP'}/system.log 1>> $ENV{'PBTMP'}/system.log" if ((! defined $verbose) || ($verbose ne "noredir"));
    150 # If there is a redirection in the command, then do not redirect in system.log
    151 # as you won't get the redirection working as expected
    152 $redir = "" if ($cmd =~ /\>/);
    153150system("$cmd $redir");
    154151my $res = $?;
  • devel/pb/bin/pb

    r1117 r1120  
    5252my $pbrev;                  # Global REVISION variable
    5353my $pbaccount;              # Login to use to connect to the VM
     54my $pbtarget;               # Target os-ver-arch you want to build for
    5455my $pbport;                 # Port to use to connect to the VM
    5556my $newver;                 # New version to create
     
    7778=head1 SYNOPSIS
    7879
    79 pb [-vhSq][-r pbroot][-p project][[-s script -a account -P port][-m mach-1[,...]]][-i iso] <action> [<pkg1> ...]
    80 
    81 pb [--verbose][--help][--man][--quiet][--snapshot][--revision pbroot][--project project][[--script script --account account --port port][--machine mach-1[,...]]][--iso iso] <action> [<pkg1> ...]
     80pb [-vhSq][-r pbroot][-p project][[-s script -a account -P port][-t os-ver-arch][-m os-ver-arch[,...]]][-i iso] <action> [<pkg1> ...]
     81
     82pb [--verbose][--help][--man][--quiet][--snapshot][--revision pbroot][--project project][[--script script --account account --port port][--target os-ver-arch][--machine os-ver-arch[,...]]][--iso iso] <action> [<pkg1> ...]
    8283
    8384=head1 OPTIONS
     
    105106Prints the manual page and exits.
    106107
    107 =item B<-m|--machine machine1[,machine2,...]>
     108=item B<-t|--target os-ver-arch>
     109
     110Name of the target system you want to build for.
     111All if none precised.
     112
     113=item B<-m|--machine os-ver-arch[,os-ver-arch,...]>
    108114
    109115Name of the Virtual Machines (VM) or Virtual Environments (VE) you want to build on (coma separated).
     
    411417        "script|s=s" => \$opts{'s'},
    412418        "machines|mock|m=s" => \$opts{'m'},
     419        "target|t=s" => \$opts{'t'},
    413420        "port|P=i" => \$opts{'P'},
    414421        "project|p=s" => \$opts{'p'},
     
    466473if (defined $opts{'i'}) {
    467474    $iso = $opts{'i'};
     475}
     476if (defined $opts{'t'}) {
     477    $pbtarget = $opts{'t'};
    468478}
    469479
     
    636646    # We need 2 lines here
    637647    my ($pkgv, $pkgt, $testver) = pb_conf_get_if("pkgver","pkgtag","testver");
    638     my @pt = pb_conf_get_if("vmlist","velist");
    639648
    640649    # declare packager and repo for filtering
     
    715724
    716725        my %build;
     726        my %patches;
    717727        # We want to at least build for the underlying distro
    718         my ($ddir, $dver, $dfam, $dtype, $dos, $pbsuf, $pbupd, $pbins, $arch) = pb_distro_init();
     728        # except if a target was given, in which case we only build for it
     729        my ($tdir,$tver,$tarch);
     730        ($tdir,$tver,$tarch) = split(/-/,$pbtarget) if (defined ($pbtarget));
     731
     732        my ($ddir, $dver, $dfam, $dtype, $dos, $pbsuf, $pbupd, $pbins, $arch) = pb_distro_init($tdir,$tver,$tarch);
    719733        my $tmpl = "$ddir-$dver-$arch,";
    720         my %patches;
    721 
    722         # Get list of distributions for which we need to generate build files
    723         if (defined $pt[0]->{$ENV{'PBPROJ'}}) {
    724             $tmpl .= $pt[0]->{$ENV{'PBPROJ'}};
    725         }
    726         if (defined $pt[1]->{$ENV{'PBPROJ'}}) {
    727             # The 2 lists needs to be grouped with a ',' separating them
    728             if ($tmpl ne "") {
    729                 $tmpl .= ",";
    730             }
    731             $tmpl .= $pt[1]->{$ENV{'PBPROJ'}}
     734
     735        # Get list of distributions for which we need to generate build files if no target
     736        if (not defined ($pbtarget)) {
     737            my @pt = pb_conf_get_if("vmlist","velist");
     738            if (defined $pt[0]->{$ENV{'PBPROJ'}}) {
     739                $tmpl .= $pt[0]->{$ENV{'PBPROJ'}};
     740            }
     741            if (defined $pt[1]->{$ENV{'PBPROJ'}}) {
     742                # The 2 lists needs to be grouped with a ',' separating them
     743                if ($tmpl ne "") {
     744                    $tmpl .= ",";
     745                }
     746                $tmpl .= $pt[1]->{$ENV{'PBPROJ'}}
     747            }
    732748        }
    733749   
  • pbconf/devel/website/pbinit

    r1118 r1120  
    9898    # generate ps pages
    9999    #system("groff -Tps -mandoc $f.$ext > ../docs/$f.$ext.ps");
    100     pb_system("groff -Tps -mandoc $f.$ext > ../docs/$f.$ext.ps","Generating Postscript pages");
     100    # Use noredir here because is doesn't redirect to the right place without
     101    pb_system("groff -Tps -mandoc $f.$ext > ../docs/$f.$ext.ps","Generating Postscript pages","noredir");
    101102    # generate pdf pages
    102103    pb_system("ps2pdf ../docs/$f.$ext.ps","Generating PDF pages");
Note: See TracChangeset for help on using the changeset viewer.