Changeset 1401


Ignore:
Timestamp:
02/03/12 00:17:01 (17 months ago)
Author:
bruno
Message:

r4486@cabanilles: bruno | 2012-02-01 15:24:46 +0100

  • Make the parameter of the -t option optional, in which case the underlying distro is used
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1393 r1401  
    5353my $pbrev;                  # Global REVISION variable 
    5454my $pbaccount;              # Login to use to connect to the VM/RM 
    55 my $pbtarget;               # Target os-ver-arch you want to build for 
     55my $pbtarget = undef;       # Target os-ver-arch you want to build for 
    5656my $pbport;                 # Port to use to connect to the VM/RM 
    5757my $newver;                 # New version to create 
     
    7979=head1 SYNOPSIS 
    8080 
    81 pb [-vhSq][-r pbroot][-p project][[-s script -a account -P port][-t os-ver-arch][-m os-ver-arch[,...]]][-g][-i iso] <action> [<pkg1> ...] 
    82  
    83 pb [--verbose][--help][--man][--quiet][--snapshot][--revision pbroot][--project project][[--script script --account account --port port][--target os-ver-arch][--machine os-ver-arch[,...]]][--nographic][--iso iso][--rebuild] <action> [<pkg1> ...] 
     81pb [-vhSq][-r pbroot][-p project][[-s script -a account -P port][-t [os-ver-arch]][-m os-ver-arch[,...]]][-g][-i iso] <action> [<pkg1> ...] 
     82 
     83pb [--verbose][--help][--man][--quiet][--snapshot][--revision pbroot][--project project][[--script script --account account --port port][--target [os-ver-arch]][--machine os-ver-arch[,...]]][--nographic][--iso iso][--rebuild] <action> [<pkg1> ...] 
    8484 
    8585=head1 OPTIONS 
     
    483483        "script|s=s" => \$opts{'s'}, 
    484484        "machines|mock|m=s" => \$opts{'m'}, 
    485         "target|t=s" => \$opts{'t'}, 
     485        "target|t:s" => \$opts{'t'}, 
    486486        "nographic|g" => \$opts{'g'}, 
    487487        "port|P=i" => \$opts{'P'}, 
     
    544544if (defined $opts{'t'}) { 
    545545    $pbtarget = $opts{'t'}; 
     546    # GetOptions may create an empty string, we use internally undef for that type of target 
     547    if ($pbtarget eq "") { 
     548        $pbtarget = undef; 
     549    } 
    546550} 
    547551 
     
    863867        # We want to at least build for the underlying distro 
    864868        # except if a target was given, in which case we only build for it 
     869        # if -t was passed without target then build for the native distro. 
    865870        my $pbos = pb_distro_get_context($pbtarget); 
    866871        my $tmpl = pb_get_distros($pbos,$pbtarget); 
Note: See TracChangeset for help on using the changeset viewer.