Changeset 2491 in ProjectBuilder
- Timestamp:
- Mar 31, 2020, 11:26:06 AM (5 years ago)
- Location:
- devel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Conf.pm
r2488 r2491 210 210 } else { 211 211 eval { 212 require YAML ;213 YAML ->import();212 require YAML::XS; 213 YAML::XS->import(); 214 214 }; 215 215 if ($@) { 216 216 eval { 217 # No YAML found using a more std but less complete one. Old perl only 218 require Module::Build::YAML; 219 Module::Build::YAML->import(); 217 require YAML; 218 YAML->import(); 220 219 }; 221 220 if ($@) { 222 221 eval { 223 222 # No YAML found using a more std but less complete one. Old perl only 224 require YAML::Tiny;225 YAML::Tiny->import();223 require Module::Build::YAML; 224 Module::Build::YAML->import(); 226 225 }; 227 226 if ($@) { 228 227 eval { 229 # No YAML found using a n embedded pne230 require ProjectBuilder::YAML;231 ProjectBuilder::YAML->import();228 # No YAML found using a more std but less complete one. Old perl only 229 require YAML::Tiny; 230 YAML::Tiny->import(); 232 231 }; 233 232 if ($@) { 234 # Here we should be in the setup phase, with an embedded YAML code 235 $ldfunc = \&LoadFile; 236 #die "Unable to handle YAML configuration files without a YAML.pm module\n"; 233 eval { 234 # No YAML found using an embedded pne 235 require ProjectBuilder::YAML; 236 ProjectBuilder::YAML->import(); 237 }; 238 if ($@) { 239 # Here we should be in the setup phase, with an embedded YAML code 240 $ldfunc = \&LoadFile; 241 #die "Unable to handle YAML configuration files without a YAML.pm module\n"; 242 } else { 243 $ldfunc = \&ProjectBuilder::YAML::LoadFile; 244 } 237 245 } else { 238 $ldfunc = \& ProjectBuilder::YAML::LoadFile;246 $ldfunc = \&YAML::Tiny::LoadFile; 239 247 } 240 248 } else { 241 $ldfunc = \& YAML::Tiny::LoadFile;249 $ldfunc = \&Module::Build::YAML::LoadFile; 242 250 } 243 251 } else { 244 $ldfunc = \&Module::Build::YAML::LoadFile; 245 } 252 $ldfunc = \&YAML::LoadFile; 246 253 } else { 247 $ldfunc = \&YAML::LoadFile; 248 } 254 $ldfunc = \&YAML::XS::LoadFile; 255 } 256 257 # Have we already handled that conf file ? 258 next if ($lh->{'__cf'}->{$cf} eq 1); 249 259 250 260 pb_log(1,"Loading YAML conf file $cf\n"); … … 265 275 } 266 276 } 277 # Remember we've seen that conf file 278 $lh->{'__cf'}->{$cf} = 1; 267 279 } 268 280 return($lh); … … 277 289 sub pb_conf_add { 278 290 279 pb_log(2,"DEBUG: pb_conf_add with ".Dumper(@_)."\n");280 291 my $lh; 281 292 … … 288 299 return($lh) if (defined $pbconffiles{$cf}); 289 300 301 pb_log(2,"DEBUG: pb_conf_add with $cf\n"); 290 302 # The new conf file overload values already managed 291 303 my $num = keys %pbconffiles; -
devel/pb/bin/pb
r2488 r2491 1318 1318 # Try to use // processing here 1319 1319 my $all_ok = 1; 1320 my $pm = new Parallel::ForkManager($pbparallel) if (defined $pbparallel); 1321 $pm->run_on_finish(sub { my ($pid, $code, $id, $signal, $dump) = @_; 1322 $all_ok = 0 unless (($code == 0) && ($signal == 0) && ($dump == 0)); }) if (defined $pbparallel); 1320 my $pm; 1321 if (defined $pbparallel) { 1322 $pm = new Parallel::ForkManager($pbparallel); 1323 $pm->set_waitpid_blocking_sleep(0); 1324 $pm->run_on_finish(sub { my ($pid, $code, $id, $signal, $dump) = @_; 1325 $all_ok = 0 unless (($code == 0) && ($signal == 0) && ($dump == 0)); }); 1326 } 1323 1327 1324 1328 pb_log(0,"Preparing delivery ...\n"); … … 1736 1740 if (defined $pbparallel) { 1737 1741 $pm = new Parallel::ForkManager($pbparallel); 1742 $pm->set_waitpid_blocking_sleep(0); 1738 1743 $pm->run_on_finish(sub { my ($pid, $code, $id, $signal, $dump) = @_; 1739 1744 $all_ok = 0 unless (($code == 0) && ($signal == 0) && ($dump == 0)); }); … … 3117 3122 if (defined $pbparallel) { 3118 3123 $pm = new Parallel::ForkManager($pbparallel); 3124 $pm->set_waitpid_blocking_sleep(0); 3119 3125 3120 3126 # Set which port the VM/RM will use to communicate … … 3475 3481 if (defined $pbparallel) { 3476 3482 $pm = new Parallel::ForkManager($pbparallel); 3483 $pm->set_waitpid_blocking_sleep(0); 3477 3484 3478 3485 # Set which port the VM/RM will use to communicate … … 3812 3819 if (defined $pbparallel) { 3813 3820 $pm = new Parallel::ForkManager($pbparallel); 3821 $pm->set_waitpid_blocking_sleep(0); 3814 3822 3815 3823 # Set which port the VM/RM will use to communicate … … 4403 4411 if (defined $pbparallel) { 4404 4412 $pm = new Parallel::ForkManager($pbparallel); 4413 $pm->set_waitpid_blocking_sleep(0); 4405 4414 4406 4415 $pm->run_on_finish(sub { my ($pid, $code, $id, $signal, $dump) = @_; -
devel/pb/lib/ProjectBuilder/Changelog.pm
r2488 r2491 104 104 my @date = pb_get_date(); 105 105 # If we don't need to do it, or don't have it fake something 106 if (((not defined $chglog) || (! -f $chglog)) &&($doit ne "yes")) {106 if (((not defined $chglog) || (! -f $chglog)) || ($doit ne "yes")) { 107 107 pb_log(2,"No ChangeLog file for $pbrealpkg - faking one\n"); 108 108 $date = strftime("%Y-%m-%d", @date); -
devel/pb/lib/ProjectBuilder/Filter.pm
r2488 r2491 118 118 local $_ = $ptr->{$in_key} || ''; 119 119 eval $expr; 120 die "Error evaluating tran form for $out_key ($expr): $@" if $@;120 die "Error evaluating transform for $out_key ($expr): $@" if $@; 121 121 $ptr->{$out_key} = $_; 122 122 pb_log(2, "Transform $in_key to $out_key\n$ptr->{$in_key}\n$ptr->{$out_key}\n"); … … 186 186 # special case for ChangeLog only for pb 187 187 pb_log(3,"DEBUG filtering PBLOG\n"); 188 my ($testver) = pb_conf_get_if("testver"); 189 $tmp = "no" if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)); 188 190 pb_changelog($pb, \*DEST, $tmp); 189 191 $tmp = "";
Note:
See TracChangeset
for help on using the changeset viewer.