Changeset 417 in ProjectBuilder
- Timestamp:
- Apr 27, 2008, 1:18:10 AM (17 years ago)
- Location:
- devel/pb
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified devel/pb/Makefile.PL ¶
r405 r417 20 20 MAN3PODS => { 'lib/ProjectBuilder/CMS.pm' => '$(INST_MAN3DIR)/ProjectBuilder::CMS.$(MAN3EXT)', 21 21 'lib/ProjectBuilder/Filter.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Filter.$(MAN3EXT)', 22 'lib/ProjectBuilder/Changelog.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Changelog.$(MAN3EXT)', }, 22 'lib/ProjectBuilder/Changelog.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Changelog.$(MAN3EXT)', 23 'lib/ProjectBuilder/Env.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Env.$(MAN3EXT)', }, 23 24 ); -
TabularUnified devel/pb/bin/pb ¶
r416 r417 552 552 if (defined $ptr) { 553 553 foreach my $f (values %bfiles,values %pkgfiles) { 554 pb_filter_file_pb("$ENV{'PBROOTDIR'}/$f",$ptr,"$dest/pbconf/$ddir-$dver/".basename($f),$dtype,$pbsuf,$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$defpkgdir,$extpkgdir,$ENV{'PBPACKAGER'},$chglog );554 pb_filter_file_pb("$ENV{'PBROOTDIR'}/$f",$ptr,"$dest/pbconf/$ddir-$dver/".basename($f),$dtype,$pbsuf,$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$defpkgdir,$extpkgdir,$ENV{'PBPACKAGER'},$chglog,$ENV{'PBPROJ'}); 555 555 } 556 556 } … … 574 574 if (defined $filteredfiles->{$pbpkg}) { 575 575 foreach my $f (split(/,/,$filteredfiles->{$pbpkg})) { 576 pb_filter_file_inplace($ptr,"$dest/$f",$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$ENV{'PBPACKAGER'} );576 pb_filter_file_inplace($ptr,"$dest/$f",$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$ENV{'PBPACKAGER'},$ENV{'PBPROJ'}); 577 577 $liste = "$f $liste"; 578 578 } … … 582 582 # Prepare the dest directory for archive 583 583 if (-x "$ENV{'PBROOTDIR'}/$pbpkg/pbinit") { 584 pb_filter_file("$ENV{'PBROOTDIR'}/$pbpkg/pbinit",$ptr,"$ENV{'PBTMP'}/pbinit",$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$ENV{'PBPACKAGER'} );584 pb_filter_file("$ENV{'PBROOTDIR'}/$pbpkg/pbinit",$ptr,"$ENV{'PBTMP'}/pbinit",$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$ENV{'PBPACKAGER'},$ENV{'PBPROJ'}); 585 585 chmod 0755,"$ENV{'PBTMP'}/pbinit"; 586 586 pb_system("cd $dest ; $ENV{'PBTMP'}/pbinit","Executing init script from $ENV{'PBROOTDIR'}/$pbpkg/pbinit"); … … 824 824 } 825 825 } 826 # Adds conf file for availanility of conf elements 827 pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb"); 828 826 829 if (($cmt eq "vm") || ($cmt eq "ve")) { 827 830 $src="$src $ENV{'PBDESTDIR'}/pbscript $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb $ENV{'PBETC'} $ENV{'PBDESTDIR'}/pbrc"; 828 # Adds conf file used for final delivery829 pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb");830 831 } elsif ($cmt eq "Script") { 831 832 $src="$src $ENV{'PBDESTDIR'}/pbscript"; -
TabularUnified devel/pb/lib/ProjectBuilder/Env.pm ¶
r416 r417 20 20 use ProjectBuilder::Base; 21 21 use ProjectBuilder::Conf; 22 use ProjectBuilder::CMS; 22 23 23 24 # Inherit from the "Exporter" module which handles exporting functions. … … 174 175 # 175 176 # Removes all directory existing below the delivery dir 176 # as they are temp dir only 177 # as they are temp dir only except when called from pbinit 177 178 # Files stay and have to be cleaned up manually if needed 178 179 # those files serves as communication channels between pb phases 179 180 # Removing them prevents a following phase to detect what has been done before 180 181 # 181 if ( -d $ENV{'PBDESTDIR'}) {182 if ((-d $ENV{'PBDESTDIR'}) && ($action !~ /pbinit/)) { 182 183 opendir(DIR,$ENV{'PBDESTDIR'}) || die "Unable to open directory $ENV{'PBDESTDIR'}: $!"; 183 184 foreach my $d (readdir(DIR)) { … … 210 211 # return values in that case are useless 211 212 # 212 if (($action =~ /^cms2/) || ($action =~ /^newver$/) ) {213 if (($action =~ /^cms2/) || ($action =~ /^newver$/) || ($action =~ /^pbinit$/)) { 213 214 214 215 # -
TabularUnified devel/pb/lib/ProjectBuilder/Filter.pm ¶
r415 r417 121 121 This function applies all filters to pb build files. 122 122 123 It takes 15 parameters. 123 It takes 15 parameters. To be filtered a variable has to be passed to that function. 124 124 125 125 The first parameter is the file to filter. … … 137 137 The thirteenth parameter is the packager name. 138 138 The fourteenth parameter is the changelog. 139 The fifteenth parameter is the project. 139 140 140 141 =cut … … 157 158 my $pbpackager = shift; 158 159 my $chglog = shift || undef; 160 my $pbproj = shift; 159 161 160 162 pb_log(2,"DEBUG: From $f to $destfile\n"); … … 192 194 This function applies all filters to a file in place. 193 195 194 It takes 8parameters.196 It takes 9 parameters. 195 197 196 198 The first parameter is the pointer on the hash of filters. … … 202 204 The seventh parameter is the current date. 203 205 The eighth parameter is the packager name. 206 The nineth parameter is the project name. 204 207 205 208 =cut … … 217 220 my $pbdate=shift; 218 221 my $pbpackager=shift; 222 my $pbproj=shift; 219 223 220 224 my $cp = "$ENV{'PBTMP'}/".basename($destfile); 221 225 copy($destfile,$cp) || die "Unable to create $cp"; 222 226 223 pb_filter_file($cp,$ptr,$destfile,$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$pbpackager );227 pb_filter_file($cp,$ptr,$destfile,$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$pbpackager,$pbproj); 224 228 unlink $cp; 225 229 } … … 229 233 This function applies all filters on a file to generate a new filtered one. 230 234 231 It takes 9 parameters.235 It takes 10 parameters. To be filtered a variable has to be passed to that function. 232 236 233 237 The first parameter is the original file to filter. … … 240 244 The eighth parameter is the current date. 241 245 The nineth parameter is the packager name. 246 The tenth parameter is the project name. 242 247 243 248 =cut … … 257 262 my $pbdate=shift; 258 263 my $pbpackager=shift; 264 my $pbproj=shift; 259 265 260 266 pb_log(2,"DEBUG: From $f to $destfile\n");
Note:
See TracChangeset
for help on using the changeset viewer.