Changeset 1126 in ProjectBuilder
- Timestamp:
- Dec 13, 2010, 2:53:10 AM (13 years ago)
- Location:
- devel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/etc/pb.conf
r1123 r1126 445 445 oscmd rpmbootstrap = rpm,rpm2cpio,wget 446 446 #oscmdopt rpmbootstrap = 447 448 # Number of process in // for pb 449 #pbparallel pb = 2 450 447 451 # 448 452 # Commands to check packages -
devel/pb-modules/etc/pb.conf.pod
r1117 r1126 86 86 Conffile: pb 87 87 Example: oschkcmd rpm = -i 88 89 =item B<oscmd> 90 91 Nature: Mandatory 92 Key: tool (pb or rpmbootstrap) 93 Value: come separated list of commands that are mandatory on the underlying system 94 Conffile: pb 95 Example: oscmd pb = tar,ls 96 97 =item B<oscmdopt> 98 99 Nature: Mandatory 100 Key: tool (pb or rpmbootstrap) 101 Value: come separated list of commands that are optional on the underlying system 102 Conffile: pb 103 Example: oscmd pb = svn2cl,svn,cvs 88 104 89 105 =item B<oscodename> … … 246 262 Conffile: project 247 263 Example: pbpackager pb = Bruno Cornec <bruno@project-builder.org> 264 265 =item B<pbparallel> 266 267 Nature: Optional 268 Key: tool (pb or rpmbootstrap) 269 Value: number of processes to execute in parallel. By default use the number of cores. 270 Conffile: pb 271 Example: pbparallel pb = 12 248 272 249 273 =item B<pbpkg> -
devel/pb/bin/pb
r1125 r1126 498 498 # Check for command requirements 499 499 # 500 my ($req,$opt ) = pb_conf_get_if("oscmd","oscmdopt");500 my ($req,$opt,$pbpara) = pb_conf_get_if("oscmd","oscmdopt","pbparallel"); 501 501 my ($req2,$opt2) = (undef,undef); 502 502 $req2 = $req->{$appname} if (defined $req); … … 507 507 # Check if we can launch some actions in // with Parallel::ForkManager 508 508 # 509 my $pbparallel = 12; 509 my $pbparallel = $pbpara->{$appname} if (defined $pbpara); 510 if (not defined $pbparallel) { 511 eval 512 { 513 require Sys::CPU; 514 Sys::CPU->import(); 515 }; 516 if ($@) { 517 # Sys::CPU not found, defaulting to 1 518 $pbparallel = 1; 519 } else { 520 # Using the number of cores 521 $pbparallel = Sys::CPU::cpu_count(); 522 } 523 } 524 510 525 eval 511 526 {
Note:
See TracChangeset
for help on using the changeset viewer.