Changeset 322 in ProjectBuilder
- Timestamp:
- Feb 19, 2008, 5:31:31 PM (17 years ago)
- Location:
- devel/pb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r320 r322 511 511 if ($cmt eq "vm") { 512 512 $login = "vmlogin"; 513 $dir = "pbd ir";513 $dir = "pbdefdir"; 514 514 $tmout = "vmtmout"; 515 515 $rebuild = "vmrebuild"; … … 519 519 } elsif ($cmt eq "ve") { 520 520 $login = "velogin"; 521 $dir = "pbd ir";521 $dir = "pbdefdir"; 522 522 $tmout = "vetmout"; 523 523 # Specific VE -
devel/pb/lib/ProjectBuilder/Base.pm
r321 r322 58 58 # and use its content 59 59 # 60 my ($pbconf) = pb_conf_read("$ENV{'PBETC'}","pbconf ");61 pb_log(2,"DEBUG pbconf : ".Dumper($pbconf)."\n");60 my ($pbconf) = pb_conf_read("$ENV{'PBETC'}","pbconfurl"); 61 pb_log(2,"DEBUG pbconfurl: ".Dumper($pbconf)."\n"); 62 62 63 63 my %pbconf = %$pbconf; … … 67 67 if (defined $proj) { 68 68 pb_log(0,"WARNING: using $proj as default project as none has been specified\n"); 69 pb_log(0," Please either create a pbconf reference for project $proj in $ENV{'PBETC'}\n");69 pb_log(0," Please either create a pbconfurl reference for project $proj in $ENV{'PBETC'}\n"); 70 70 pb_log(0," or call pb with the -p project option or use the env var PBPROJ\n"); 71 71 pb_log(0," if you want to use another project\n"); 72 72 } 73 73 } 74 die "No project defined - use env var PBPROJ or -p proj or a pbconf entry in $ENV{'PBETC'}" if (not (defined $proj));74 die "No project defined - use env var PBPROJ or -p proj or a pbconfurl entry in $ENV{'PBETC'}" if (not (defined $proj)); 75 75 76 76 # That's always the environment variable that will be used … … 79 79 80 80 if (not defined ($pbconf{$ENV{'PBPROJ'}})) { 81 die "Please create a pbconf reference for project $ENV{'PBPROJ'} in $ENV{'PBETC'}\n";81 die "Please create a pbconfurl reference for project $ENV{'PBPROJ'} in $ENV{'PBETC'}\n"; 82 82 } 83 83 … … 87 87 # Tree will look like this: 88 88 # 89 # maint pbd ir PBDIRdev dir (optional) PBDEVDIR89 # maint pbdefdir PBDEFDIR dev dir (optional) PBDEVDIR 90 90 # | | 91 91 # ------------------------ -------------------- … … 94 94 # | | 95 95 # --------------------------------------------- ---------- 96 # * * || | | * *96 # * * * | | | * * 97 97 # 1.0 dev pbconf ... build delivery PBCONF dev tag PBDEVROOT 98 98 # | | PBDESTDIR | … … 114 114 # 115 115 # 116 # (*) By default, if no relocation in .pbrc, dev dir is taken in the maint pbd ir (when appropriate)116 # (*) By default, if no relocation in .pbrc, dev dir is taken in the maint pbdefdir (when appropriate) 117 117 # Names under a pbproj and the corresponding pbconf should be similar 118 118 # 119 119 120 my ($pbd ir) = pb_conf_get_if("pbdir");121 my %pbd ir = %$pbdir;122 123 if (not defined $ENV{'PBD IR'}) {124 if ((not defined $pbd ir) || (not defined $pbdir{$ENV{'PBPROJ'}})) {125 pb_log(0,"WARNING: no pbd ir defined, using /var/cache\n");126 pb_log(0," Please create a pbd ir reference for project $ENV{'PBPROJ'} in $ENV{'PBETC'}\n");120 my ($pbdefdir) = pb_conf_get_if("pbdefdir"); 121 my %pbdefdir = %$pbdefdir; 122 123 if (not defined $ENV{'PBDEFDIR'}) { 124 if ((not defined $pbdefdir) || (not defined $pbdefdir{$ENV{'PBPROJ'}})) { 125 pb_log(0,"WARNING: no pbdefdir defined, using /var/cache\n"); 126 pb_log(0," Please create a pbdefdir reference for project $ENV{'PBPROJ'} in $ENV{'PBETC'}\n"); 127 127 pb_log(0," if you want to use another directory\n"); 128 $ENV{'PBD IR'} = "/var/cache";128 $ENV{'PBDEFDIR'} = "/var/cache"; 129 129 } else { 130 130 # That's always the environment variable that will be used 131 $ENV{'PBD IR'} = $pbdir{$ENV{'PBPROJ'}};131 $ENV{'PBDEFDIR'} = $pbdefdir{$ENV{'PBPROJ'}}; 132 132 } 133 133 } 134 134 # Expand potential env variable in it 135 eval { $ENV{'PBD IR'} =~ s/(\$ENV.+\})/$1/eeg };136 137 pb_log(2,"PBD IR: $ENV{'PBDIR'}\n");135 eval { $ENV{'PBDEFDIR'} =~ s/(\$ENV.+\})/$1/eeg }; 136 137 pb_log(2,"PBDEFDIR: $ENV{'PBDEFDIR'}\n"); 138 138 # 139 139 # Set delivery directory 140 140 # 141 $ENV{'PBDESTDIR'}="$ENV{'PBD IR'}/$ENV{'PBPROJ'}/delivery";141 $ENV{'PBDESTDIR'}="$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}/delivery"; 142 142 143 143 pb_log(2,"PBDESTDIR: $ENV{'PBDESTDIR'}\n"); … … 165 165 # Set build directory 166 166 # 167 $ENV{'PBBUILDDIR'}="$ENV{'PBD IR'}/$ENV{'PBPROJ'}/build";167 $ENV{'PBBUILDDIR'}="$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}/build"; 168 168 if (! -d "$ENV{'PBBUILDDIR'}") { 169 169 pb_mkdir_p($ENV{'PBBUILDDIR'}) || die "Unable to recursively create $ENV{'PBBUILDDIR'}"; … … 190 190 # Check pbconf compliance 191 191 # 192 $ENV{'PBCONF'} = "$ENV{'PBDIR'}/$ENV{'PBPROJ'}/pbconf"; 192 my ($pbconfdir) = pb_conf_get_if("pbconfdir"); 193 my %pbconfdir = %$pbconfdir; 194 195 if ((defined $pbconfdir) && (defined $pbconfdir{$ENV{'PBPROJ'}})) { 196 # That's always the environment variable that will be used 197 $ENV{'PBCONF'} = $pbconfdir{$ENV{'PBPROJ'}}; 198 } else { 199 pb_log(0,"WARNING: no pbconfdir defined, using $ENV{'PBDIR'}/$ENV{'PBPROJ'}/pbconf\n"); 200 pb_log(0," Please create a pbconfdir reference for project $ENV{'PBPROJ'} in $ENV{'PBETC'}\n"); 201 pb_log(0," if you want to use another directory\n"); 202 $ENV{'PBCONF'} = "$ENV{'PBDIR'}/$ENV{'PBPROJ'}/pbconf"; 203 } 193 204 pb_log(2,"PBCONF: $ENV{'PBCONF'}\n"); 194 205
Note:
See TracChangeset
for help on using the changeset viewer.