Changeset 29 in ProjectBuilder for devel/pb/bin
- Timestamp:
- Aug 2, 2007, 12:36:11 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb.pl
r28 r29 115 115 # And generate some additional files 116 116 $OUTPUT_AUTOFLUSH=1; 117 print $LOG "$ENV{'PBCMSEXP'} of $pbpkg..." if ($debug >= 0); 117 118 118 # computes in which dir we have to work 119 119 my $dir = $defpkgdir{$pbpkg}; 120 120 $dir = $extpkgdir{$pbpkg} if (not defined $dir); 121 system("$ENV{'PBCMSEXP'} $option $ENV{'PBROOT'}/$dir $dest 1>/dev/null"); 122 if ($? == -1) { 123 print $LOG "failed to execute: $!\n" if ($debug >= 0); 124 } elsif ($? & 127) { 125 printf $LOG "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without' if ($debug >= 0); 126 } else { 127 print $LOG " OK\n" if ($debug >= 0); 128 } 121 pbsystem("$ENV{'PBCMSEXP'} $option $ENV{'PBROOT'}/$dir $dest 1>/dev/null", "Exporting $ENV{'PBROOT'}/$dir... "); 129 122 130 123 # Creates a REVISION file … … 134 127 135 128 # Extract cms log history and store it 136 system("$ENV{'PBCMSLOG'} $option $ENV{'PBROOT'}/$dir > $dest/$ENV{'PBCMSLOGFILE'}"); 137 print $LOG "$ENV{'PBCMSLOG'} of $pbpkg..." if ($debug >= 0); 138 if ($? == -1) { 139 print $LOG "failed to execute: $!\n" if ($debug >= 0); 140 } elsif ($? & 127) { 141 printf $LOG "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without' if ($debug >= 0); 142 } else { 143 print $LOG " OK\n" if ($debug >= 0); 144 } 129 pbsystem("$ENV{'PBCMSLOG'} $option $ENV{'PBROOT'}/$dir > $dest/$ENV{'PBCMSLOGFILE'}", "Extracting log info... "); 130 145 131 my %build; 146 132 open(D,"$ENV{'PBCONF'}/DISTROS") || die "Unable to find $ENV{'PBCONF'}/DISTROS\n"; … … 257 243 # Prepare the dest directory for archive 258 244 if (-x "$ENV{'PBCONF'}/$pbpkg/pbpkginit") { 259 print $LOG " Executing $ENV{'PBCONF'}/$pbpkg/pbinit...\n" if ($debug >= 0); 260 system("cd $dest ; $ENV{'PBCONF'}/$pbpkg/pbinit"); 261 if ($? == -1) { 262 print $LOG "failed to execute: $!\n" if ($debug >= 0); 263 } elsif ($? & 127) { 264 printf $LOG "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without' if ($debug >= 0); 265 } else { 266 print $LOG " OK\n" if ($debug >= 0); 267 } 268 } 245 pbsystem("cd $dest ; $ENV{'PBCONF'}/$pbpkg/pbinit","Executing init script $ENV{'PBCONF'}/$pbpkg/pbinit"); 246 } 247 269 248 # Archive dest dir 270 249 chdir "$ENV{'PBDESTDIR'}"; 271 print $LOG "Creating $pbpkg tar files (gzip... " if ($debug >= 0);272 250 # Possibility to look at PBSRC to guess more the filename 273 system("tar cfphz $pbpkg-$pbver.tar.gz $pbpkg-$pbver");251 pbsystem("tar cfphz $pbpkg-$pbver.tar.gz $pbpkg-$pbver","Creating $pbpkg tar files (gzip... "); 274 252 if ($? == -1) { 275 253 print $LOG "failed to execute: $!\n" if ($debug >= 0); … … 332 310 foreach my $f (@specfile) { 333 311 if ($f =~ /\.spec$/) { 334 print $LOG "rpmbuild -ba $f ...\n"; 335 system("rpmbuild -ba $f"); 312 pbsystem("rpmbuild -ba $f","Building package with $f... "); 336 313 last; 337 314 } … … 418 395 my @files; 419 396 420 print $LOG "Extracting build files... " if ($debug >= 0); 421 system("tar xfz $src $dir >/dev/null"); 422 if ($? == -1) { 423 print $LOG "failed to execute: $!\n" if ($debug >= 0); 424 } elsif ($? & 127) { 425 printf $LOG "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without' if ($debug >= 0); 426 } else { 427 print $LOG " OK\n" if ($debug >= 0); 428 } 397 pbsystem("tar xfz $src $dir >/dev/null","Extracting build files... "); 429 398 opendir(DIR,"$dir") || die "Unable to open directory $dir"; 430 399 foreach my $f (readdir(DIR)) {
Note:
See TracChangeset
for help on using the changeset viewer.