- Timestamp:
- Dec 4, 2010, 2:46:48 AM (13 years ago)
- Location:
- devel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Base.pm
r1115 r1120 148 148 unlink("$ENV{'PBTMP'}/system.log") if (-f "$ENV{'PBTMP'}/system.log"); 149 149 $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.log151 # as you won't get the redirection working as expected152 $redir = "" if ($cmd =~ /\>/);153 150 system("$cmd $redir"); 154 151 my $res = $?; -
devel/pb/bin/pb
r1117 r1120 52 52 my $pbrev; # Global REVISION variable 53 53 my $pbaccount; # Login to use to connect to the VM 54 my $pbtarget; # Target os-ver-arch you want to build for 54 55 my $pbport; # Port to use to connect to the VM 55 56 my $newver; # New version to create … … 77 78 =head1 SYNOPSIS 78 79 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> ...]80 pb [-vhSq][-r pbroot][-p project][[-s script -a account -P port][-t os-ver-arch][-m os-ver-arch[,...]]][-i iso] <action> [<pkg1> ...] 81 82 pb [--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> ...] 82 83 83 84 =head1 OPTIONS … … 105 106 Prints the manual page and exits. 106 107 107 =item B<-m|--machine machine1[,machine2,...]> 108 =item B<-t|--target os-ver-arch> 109 110 Name of the target system you want to build for. 111 All if none precised. 112 113 =item B<-m|--machine os-ver-arch[,os-ver-arch,...]> 108 114 109 115 Name of the Virtual Machines (VM) or Virtual Environments (VE) you want to build on (coma separated). … … 411 417 "script|s=s" => \$opts{'s'}, 412 418 "machines|mock|m=s" => \$opts{'m'}, 419 "target|t=s" => \$opts{'t'}, 413 420 "port|P=i" => \$opts{'P'}, 414 421 "project|p=s" => \$opts{'p'}, … … 466 473 if (defined $opts{'i'}) { 467 474 $iso = $opts{'i'}; 475 } 476 if (defined $opts{'t'}) { 477 $pbtarget = $opts{'t'}; 468 478 } 469 479 … … 636 646 # We need 2 lines here 637 647 my ($pkgv, $pkgt, $testver) = pb_conf_get_if("pkgver","pkgtag","testver"); 638 my @pt = pb_conf_get_if("vmlist","velist");639 648 640 649 # declare packager and repo for filtering … … 715 724 716 725 my %build; 726 my %patches; 717 727 # 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); 719 733 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 } 732 748 } 733 749
Note:
See TracChangeset
for help on using the changeset viewer.