Changeset 736 in ProjectBuilder for devel/pb/lib
- Timestamp:
- Mar 12, 2009, 2:51:00 AM (16 years ago)
- Location:
- devel/pb/lib/ProjectBuilder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/lib/ProjectBuilder/CMS.pm
r681 r736 620 620 pb_mkdir_p("$ENV{$envar}"); 621 621 } else { 622 # Either we have a version in the uri, and it should be the same 623 # as the one in the envar. Or we should add the version to the uri 624 if (basename($uri) ne basename($ENV{$envar})) { 625 $uri .= "/".basename($ENV{$envar}) 626 } 622 627 pb_log(1,"Checking out $uri\n"); 623 628 pb_cms_checkout($scheme,$uri,$ENV{$envar}); -
devel/pb/lib/ProjectBuilder/Env.pm
r709 r736 109 109 } 110 110 111 # Adds a potential conf file now as it's more111 # Adds a potential conf file now as it's less 112 112 # important than the project conf file 113 113 my ($vmpath,$vepath) = pb_conf_get("vmpath","vepath"); … … 177 177 178 178 # Put under CMS the PBPROJ dir 179 if ( defined $pbinit) {179 if ($action =~ /^newproj$/) { 180 180 if (! -d "$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}") { 181 181 pb_mkdir_p("$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}") || die "Unable to recursively create $ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}"; … … 236 236 if (not defined $ENV{'PBROOTDIR'}) { 237 237 if (! -f ("$ENV{'PBDESTDIR'}/pbrc")) { 238 opendir(DIR,$ENV{'PBCONFDIR'}) || die "Unable to open directory $ENV{'PBCONFDIR'}: $!"; 239 my $maxmtime = 0; 240 foreach my $d (readdir(DIR)) { 241 pb_log(3,"Looking at \'$d\'..."); 242 next if ($d =~ /^\./); 243 next if (! -d "$ENV{'PBCONFDIR'}/$d"); 244 my $s = stat("$ENV{'PBCONFDIR'}/$d"); 245 next if (not defined $s); 246 pb_log(3,"KEEP\n"); 247 # Keep the most recent 248 pb_log(2," $s->mtime\n"); 249 if ($s->mtime > $maxmtime) { 250 $ENV{'PBROOTDIR'} = "$ENV{'PBCONFDIR'}/$d"; 251 $maxmtime = $s->mtime; 252 } 253 } 254 closedir(DIR); 238 $ENV{'PBROOTDIR'} = "$ENV{'PBCONFDIR'}"; 255 239 pb_log(1,"WARNING: no pbroot defined, using $ENV{'PBROOTDIR'}\n"); 256 240 pb_log(1," Please use -r release if you want to use another release\n"); … … 585 569 #filter PBDEP = 586 570 587 # PBSUF is replaced by the package suffix (\$pb suf'} in code)571 # PBSUF is replaced by the package suffix (\$pb->{'suf'} in code) 588 572 filter PBSUF = %{dist} 589 573 … … 935 919 pb_cms_checkin($pbconf{$ENV{'PBPROJ'}},"$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}",$pbinit); 936 920 } else { 921 pb_log(0,"ERROR: no pbroot defined, used $ENV{'PBROOTDIR'}, without finding $ENV{'PBPROJ'}.pb in it\n"); 922 pb_log(0," Please use -r release in order to be able to initialize your environment correctly\n"); 937 923 die "Unable to open $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb"; 938 924 }
Note:
See TracChangeset
for help on using the changeset viewer.