Changeset 2214 in ProjectBuilder
- Timestamp:
- Mar 14, 2017, 2:54:00 AM (7 years ago)
- Location:
- devel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Env.pm
r2208 r2214 171 171 # That's always the environment variable that will be used 172 172 $ENV{'PBPROJ'} = $proj; 173 pb_log( 2,"PBPROJ: $ENV{'PBPROJ'}\n");173 pb_log(1,"PBPROJ: $ENV{'PBPROJ'}\n"); 174 174 175 175 if (not defined ($pbconf{$ENV{'PBPROJ'}})) { … … 203 203 --------------------------------------------- ---------- 204 204 * * * | | | * * 205 tag dev pbconf ... bpbuild pbdelivery PBCONFDIR dev tag205 tag dev pbconf ... pbbuild pbdelivery PBCONFDIR dev tag 206 206 | | | PBDESTDIR | 207 207 --- ------ pbrc PBBUILDDIR ------- … … 244 244 # Expand potential env variable in it 245 245 $ENV{PBDEFDIR} = pb_path_expand($ENV{PBDEFDIR}); 246 pb_log( 2,"PBDEFDIR: $ENV{'PBDEFDIR'}\n");246 pb_log(1,"PBDEFDIR: $ENV{'PBDEFDIR'}\n"); 247 247 248 248 # Need to do that earlier as it's used potentialy in pb_vcs_add … … 264 264 $ENV{PBPROJDIR} = pb_path_expand($ENV{PBPROJDIR}); 265 265 266 my $pbconfpath = "$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}"; 267 266 268 # Put under CMS the PBPROJ dir 267 269 if ($action =~ /^newproj$/) { 268 if (! -d "$ ENV{'PBPROJDIR'}") {270 if (! -d "$pbconfpath") { 269 271 # TODO: There is also the need to do 270 # svn import svn://repo "$ ENV{'PBPROJDIR'}272 # svn import svn://repo "$pbconfpath 271 273 # in case it doesn't exist there 272 pb_mkdir_p("$ ENV{'PBPROJDIR'}");274 pb_mkdir_p("$pbconfpath"); 273 275 } 274 pb_vcs_add($pbconf{$ENV{'PBPROJ'}},"$ ENV{'PBPROJDIR'}");276 pb_vcs_add($pbconf{$ENV{'PBPROJ'}},"$pbconfpath"); 275 277 } 276 278 … … 278 280 # Set delivery directory 279 281 # 280 $ENV{'PBDESTDIR'}="$ENV{'PB PROJDIR'}/pbdelivery";281 282 pb_log( 2,"PBDESTDIR: $ENV{'PBDESTDIR'}\n");282 $ENV{'PBDESTDIR'}="$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}/pbdelivery"; 283 284 pb_log(1,"PBDESTDIR: $ENV{'PBDESTDIR'}\n"); 283 285 # 284 286 # Removes all directory existing below the delivery dir 285 # as they are temp dir only except when called from newproj287 # as they are temp dir only except when called from a pbinit script 286 288 # Files stay and have to be cleaned up manually if needed 287 289 # those files serves as communication channels between pb phases 288 290 # Removing them prevents a following phase to detect what has been done before 289 291 # 290 if ((-d $ENV{'PBDESTDIR'}) && ( not defined $pbinit)) {292 if ((-d $ENV{'PBDESTDIR'}) && ($action !~ /pbinit/)) { 291 293 opendir(DIR,$ENV{'PBDESTDIR'}) || die "Unable to open directory $ENV{'PBDESTDIR'}: $!"; 292 294 foreach my $d (readdir(DIR)) { … … 304 306 # Set build directory 305 307 # 306 $ENV{'PBBUILDDIR'}="$ ENV{'PBPROJDIR'}/pbbuild";308 $ENV{'PBBUILDDIR'}="$pbconfpath/pbbuild"; 307 309 if (! -d "$ENV{'PBBUILDDIR'}") { 308 310 pb_mkdir_p($ENV{'PBBUILDDIR'}); 309 311 } 310 312 311 pb_log( 2,"PBBUILDDIR: $ENV{'PBBUILDDIR'}\n");313 pb_log(1,"PBBUILDDIR: $ENV{'PBBUILDDIR'}\n"); 312 314 313 315 return if ($action =~ /^clean$/); … … 318 320 # 319 321 320 if ($action =~ /^(cms2|sbx2|newver|newproj| announce|checkssh|cleanssh|getconf|setupve)/) {322 if ($action =~ /^(cms2|sbx2|newver|newproj|pbinit|announce|checkssh|cleanssh|getconf|setupve)/) { 321 323 322 324 # 323 325 # Check pbconf cms compliance 324 326 # 325 pb_vcs_compliant("pbconfdir",'PBCONFDIR',"$ ENV{'PBPROJDIR'}/pbconf",$pbconf{$ENV{'PBPROJ'}},$pbinit);327 pb_vcs_compliant("pbconfdir",'PBCONFDIR',"$pbconfpath/pbconf",$pbconf{$ENV{'PBPROJ'}},$pbinit); 326 328 my ($scheme, $account, $host, $port, $path) = pb_get_uri($pbconf{$ENV{'PBPROJ'}}); 327 329 … … 1246 1248 } 1247 1249 pb_vcs_add($pbconf{$ENV{'PBPROJ'}},$ENV{'PBCONFDIR'}); 1248 my $msg = "updated to ".basename("$ ENV{'PBPROJDIR'}");1250 my $msg = "updated to ".basename("$pbconfpath"); 1249 1251 $msg = "Project $ENV{'PBPROJ'} creation" if (defined $pbinit); 1250 pb_vcs_checkin($pbconf{$ENV{'PBPROJ'}},"$ ENV{'PBPROJDIR'}",$msg);1252 pb_vcs_checkin($pbconf{$ENV{'PBPROJ'}},"$pbconfpath",$msg); 1251 1253 } else { 1252 1254 pb_log(0,"ERROR: no pbroot defined, used $ENV{'PBROOTDIR'}, without finding $ENV{'PBPROJ'}.pb in it\n"); -
devel/pbtest/bin/pbtest
r2204 r2214 377 377 378 378 # test also with MondoRescue 379 #sudopbtest b -p mondorescue -r branches/3.3 cms2pkg 379 sudopbtest "pb -p mondorescue -r branches/3.3 cms2pkg" 380 # and python-redfish 381 sudopbtest "pb -p python-redfish sbx2pkg" 380 382 381 383 # cleanup
Note:
See TracChangeset
for help on using the changeset viewer.