Changeset 1552 in ProjectBuilder for devel/pb/bin
- Timestamp:
- May 21, 2012, 2:57:56 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r1551 r1552 119 119 120 120 Name of the Virtual Machines (VM), Virtual Environments (VE) or Remote Machines (RM) 121 you want to build on (com a separated).121 you want to build on (comma separated). 122 122 All if none precised (or use the env variable PBV). 123 123 … … 1374 1374 sub pb_build2pkg { 1375 1375 1376 pb_log(0,"INFO: ------ Starting to build package ------\n"); 1376 1377 # Get the running distro to build on 1377 1378 my $pbos = pb_distro_get_context(); … … 1754 1755 print KEEP "$made\n"; 1755 1756 close(KEEP); 1757 pb_log(0,"INFO: ------ Finished building package ------\n"); 1756 1758 } 1757 1759 … … 2658 2660 $pm->run_on_finish(sub { my ($pid, $code, $id, $signal, $dump) = @_; 2659 2661 unless ($code == 0 && $signal == 0 && $dump == 0) { 2662 $all_ok = 0; 2660 2663 pb_log(0,"ERROR: pid $pid failed\n"); 2661 2664 } … … 4080 4083 } 4081 4084 4082 sub pb_add_com a {4085 sub pb_add_comma { 4083 4086 4084 4087 my $str = shift; … … 4103 4106 # This function works for both patches and additional sources 4104 4107 foreach my $p (sort(<$sdir/*>)) { 4105 $ptr->{$key} = pb_add_com a($ptr->{$key},"file://$p") if (($p =~ /\.all$/) || ($p =~ /\.$pbos->{'os'}$/) || ($p =~ /\.$pbos->{'type'}$/) || ($p =~ /\.$pbos->{'family'}$/) || ($p =~ /\.$pbos->{'name'}$/) || ($p =~ /\.$pbos->{'name'}-$pbos->{'version'}$/) ||($p =~ /\.$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}$/));4108 $ptr->{$key} = pb_add_comma($ptr->{$key},"file://$p") if (($p =~ /\.all$/) || ($p =~ /\.$pbos->{'os'}$/) || ($p =~ /\.$pbos->{'type'}$/) || ($p =~ /\.$pbos->{'family'}$/) || ($p =~ /\.$pbos->{'name'}$/) || ($p =~ /\.$pbos->{'name'}-$pbos->{'version'}$/) ||($p =~ /\.$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}$/)); 4106 4109 } 4107 4110 … … 4116 4119 while (<PATCH>) { 4117 4120 chomp(); 4118 $ptr->{$key} = pb_add_com a($ptr->{$key},"$_");4121 $ptr->{$key} = pb_add_comma($ptr->{$key},"$_"); 4119 4122 } 4120 4123 close(PATCH); … … 4284 4287 } 4285 4288 4286 # return list of all distributins supported, com a separated4289 # return list of all distributins supported, comma separated 4287 4290 sub pb_get_distros { 4288 4291 … … 4290 4293 my $pbtarget = shift; 4291 4294 4292 my $ tmpl = "$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'},";4295 my $dists = ("$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"); 4293 4296 4294 4297 # Get list of distributions for which we need to generate build files if no target 4295 4298 if (not defined $pbtarget) { 4296 4299 my @pt = pb_conf_get_if("vmlist","velist","rmlist"); 4297 if (defined $pt[0]->{$ENV{'PBPROJ'}}) { 4298 $tmpl .= $pt[0]->{$ENV{'PBPROJ'}}; 4299 } 4300 if (defined $pt[1]->{$ENV{'PBPROJ'}}) { 4301 # The 2 lists need to be grouped with a ',' separating them 4302 if ($tmpl ne "") { 4303 $tmpl .= ","; 4304 } 4305 $tmpl .= $pt[1]->{$ENV{'PBPROJ'}} 4306 } 4307 if (defined $pt[2]->{$ENV{'PBPROJ'}}) { 4308 # The lists needs to be grouped with a ',' separating them 4309 if ($tmpl ne "") { 4310 $tmpl .= ","; 4311 } 4312 $tmpl .= $pt[2]->{$ENV{'PBPROJ'}} 4313 } 4314 } 4315 return($tmpl); 4300 foreach my $pt (@pt) { 4301 push(@dists, split(/,/, $pt->{$ENV{PBPROJ}})) if defined $pt->{$ENV{PBPROJ}}; 4302 } 4303 # remove any whitespace 4304 grep(s/\s+//go, @dists); 4305 } 4306 return(join(",",@dists)); 4316 4307 } 4317 4308
Note:
See TracChangeset
for help on using the changeset viewer.