[Bio] / FigCommon / bootstrap.pl Repository:
ViewVC logotype

Annotation of /FigCommon/bootstrap.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.18 - (view) (download) (as text)

1 : olson 1.1 #
2 :     # FIG bootstrap script.
3 :     #
4 :     # Control is passed here from the toplevel configure (or dists/releases/install depending
5 :     # on how far we've gotten in the process).
6 :     #
7 :     # The configure has set the following environment variables for our use:
8 :     #
9 :     # FIG_HOME Root of the FIGdisk tree we're setting up
10 :     # FIGCONFIG_ENV Name of the environment we're configuring for
11 :     # FIGCONFIG_ENV_DIR Directory in which the binary install tree for $FIGCONFIG_ENV lives
12 :     # FIGCONFIG_RELEASE Release number we're configuring
13 :     # FIGCONFIG_RELEASE_DIR Directory in which that release lives
14 :     #
15 :     # Important note: perl system libraries may not be available when this
16 :     # script is running, if the FIGCONFIG_ENV_DIR is different than it was
17 :     # when the binaries were created. Part of the task of this
18 :     # script is to recognize this case and configure the process
19 :     # environment correctly so that the post-install process as
20 :     # handled by the Makefiles can use perl properly, without concern for paths.
21 :     #
22 :    
23 :     #
24 :     # Look into the FIGCONFIG_ENV_DIR for the PREFIX that this
25 :     # environment was compiled on. If that directory is different
26 :     # than the one we're currently using, rewrite @INC accordingly.
27 :     #
28 :     # We put this into a BEGIN block so that we can later use "use"
29 :     # without worrying about paths.
30 :     #
31 :     # We also set the $perlenv_override to true if we've done this,
32 :     # so we can insert these fixes into the perl tool header.
33 :     #
34 :    
35 :     BEGIN {
36 :    
37 : olson 1.3 print "Here in the perl bootstrap. inc is:\n" . join("\n", @INC), "\n";
38 : olson 1.1
39 :     my $my_prefix, $prefix, $inc, @newInc;
40 :    
41 :     $my_prefix = $ENV{FIGCONFIG_ENV_DIR};
42 :     open(P, "<$my_prefix/PREFIX");
43 :     $prefix = <P>;
44 :     chomp $prefix;
45 :    
46 :    
47 :     # print "Prefix is $prefix myprefix=$my_prefix\n";
48 :    
49 :     if ($prefix ne $my_prefix)
50 :     {
51 :     @newInc = ();
52 :     for $inc (@INC)
53 :     {
54 :     $inc =~ s,^$prefix,$my_prefix,;
55 :     push(@newInc, $inc);
56 :     }
57 :    
58 :     $::perlenv_override = 1;
59 : olson 1.3 @INC = @newInc;
60 : olson 1.1 }
61 :     }
62 :    
63 :    
64 :     use FileHandle;
65 :     use strict;
66 :    
67 :     #
68 :     # Environment definition
69 :     #
70 :     # This list contains triples
71 :     # ($name, $value, $appendFlag). $name is the name of the
72 :     # variable; $value is the value to set, and $appendFlag
73 :     # is nonzero if we need to append this value to an existing
74 :     # environment variable.
75 :     #
76 :    
77 :     our $Env = [];
78 :    
79 :     #
80 :     # FIG configuration information.
81 :     # This list contains tuples [$name, $value, $quote]
82 :     # which are to be set in the FIG_Config modules for
83 :     # both python and perl. $quote is 1 for things that need
84 :     # to be quoted, 0 otherwise.
85 :     #
86 :     our $Config = [];
87 :    
88 :     #
89 :     # Other key/value pairs of stuff we may need to pass
90 :     # to and from the environment-specific configuration modules.
91 :     #
92 :     # Known keys:
93 :     #
94 :     # pythonpath
95 :     #
96 :    
97 :     our $OtherConfig = {};
98 :    
99 :     #
100 :     # Cache values of the various places we may be installing things.
101 :     #
102 :    
103 :     our $fig_disk = $ENV{FIG_HOME};
104 :     our $env_name = $ENV{FIGCONFIG_ENV};
105 : olson 1.7 our $env_dir = "$ENV{FIGCONFIG_ENV_DIR}";
106 : olson 1.1 our $env_bin = "$ENV{FIGCONFIG_ENV_DIR}/bin";
107 :     our $env_lib = "$ENV{FIGCONFIG_ENV_DIR}/lib";
108 : olson 1.2 #
109 :     # We are moving to use a symlink in dist/releases/current for these.
110 :     # This symlink is managed by switch_to_release.
111 :     #
112 :     #our $release_bin = "$ENV{FIGCONFIG_RELEASE_DIR}/bin/$ENV{FIGCONFIG_ENV}";
113 :     #our $release_lib = "$ENV{FIGCONFIG_RELEASE_DIR}/lib/$ENV{FIGCONFIG_ENV}";
114 :    
115 : olson 1.8 our $release_bin = "$fig_disk/dist/releases/current/$ENV{FIGCONFIG_ENV}/bin";
116 :     our $release_lib = "$fig_disk/dist/releases/current/$ENV{FIGCONFIG_ENV}/lib";
117 : olson 1.2
118 :     our $fig_bin = "$fig_disk/FIG/bin";
119 : olson 1.1
120 :     #
121 :     # Location of start/stop servers scripts.
122 :     #
123 :     our $start_servers = "$fig_disk/bin/start-servers";
124 :     our $stop_servers = "$fig_disk/bin/stop-servers";
125 :    
126 :     sub configure_std_fig_environment
127 :     {
128 :     #
129 :     # Populate the Config with the usual stuff we need in FIG_Config.pm.
130 :     #
131 :    
132 :     my $fig = "$fig_disk/FIG";
133 :     my $data = "$fig/Data";
134 :    
135 :     my $hostname = `hostname`;
136 :     chomp $hostname;
137 :    
138 :     push(@$Config, ["fig_disk", $fig_disk, 1]);
139 : olson 1.6 push(@$Config, ["blastmat", "$fig_disk/BLASTMAT", 1]);
140 : olson 1.1 push(@$Config, ["fig", $fig, 1]);
141 : olson 1.2 push(@$Config, ["bin", $fig_bin, 1]);
142 : olson 1.1 push(@$Config, ["ext_bin", $env_bin, 1]);
143 : olson 1.18 push(@$Config, ["common_runtime", $env_dir, 1]);
144 :     push(@$Config, ["arch", $ENV{FIGCONFIG_ENV}, 1]);
145 : olson 1.1 push(@$Config, ["data", $data, 1]);
146 :     push(@$Config, ["global", "$data/Global", 1]);
147 :     push(@$Config, ["organisms", "$data/Organisms", 1]);
148 :     push(@$Config, ["RC", "$fig_disk/FIG/ResolutionCenter", 1]);
149 :     push(@$Config, ["NR", "$fig_disk/FIG/NR", 1]);
150 :     push(@$Config, ["temp", "$fig_disk/FIG/Tmp", 1]);
151 : olson 1.11
152 :     my $sandbox;
153 :     if ($ENV{FIGCONFIG_SANDBOX})
154 :     {
155 :     $sandbox = "/$ENV{FIGCONFIG_SANDBOX}";
156 :     }
157 :    
158 :     push(@$Config, ["temp_url", "http://$hostname$sandbox/FIG-Tmp", 1]);
159 :     push(@$Config, ["cgi_url", "http://$hostname$sandbox/FIG", 1]);
160 : golsen 1.9
161 :     #
162 :     # Add values for a relative base href of temp and CGI pages. The latter
163 :     # is used by HHTP.pm to write common page start. It would make the most
164 :     # sense to derive the above 2 values from these. -- GJO
165 :     #
166 :    
167 : olson 1.11 push(@$Config, ["temp_base", "$sandbox/FIG-Tmp/", 1]);
168 :     push(@$Config, ["cgi_base", "$sandbox/FIG/", 1]);
169 : olson 1.1 }
170 :    
171 :     sub compute_environment
172 :     {
173 :     #
174 :     # ReleaseTools configuration.
175 :     #
176 :    
177 :     push(@$Env, ["RTROOT", $ENV{FIG_HOME}, 0]);
178 :     push(@$Env, ["RTDIST", "\$RTROOT/dist", 0]);
179 :     push(@$Env, ["RTARCH", $ENV{FIGCONFIG_ENV}, 0]);
180 : olson 1.2 push(@$Env, ["RTCURRENT", "`cat \$RTROOT/CURRENT_RELEASE`", 0]);
181 : olson 1.1 push(@$Env, ["FIG_HOME", $ENV{FIG_HOME}, 0]);
182 :    
183 :     push(@$Env, ["BLASTMAT", "$ENV{FIG_HOME}/BLASTMAT", 0]);
184 :    
185 :     #
186 :     # Determine the path to use.
187 :     #
188 :     # This includes the path into the particular release we're configuring for,
189 :     # and to the environment's bin directory.
190 :     #
191 :    
192 :     my @path = ();
193 :     push(@path, $env_bin);
194 : olson 1.2 push(@path, $fig_bin);
195 : olson 1.1 push(@path, "$fig_disk/bin");
196 :    
197 :     push(@$Env, ["PATH", join(":", @path), 1]);
198 :    
199 : olson 1.2 push(@$Env, ["LD_LIBRARY_PATH", "${env_lib}", 1]);
200 : olson 1.11
201 : olson 1.14 my @perllib = grep({ $_ ne "." } @INC, "$fig_disk/config", $release_lib,
202 :     "$release_lib/FigKernelPackages");
203 : olson 1.12
204 :     push(@$Env, ["PERL5LIB", join(":", @perllib), 1]);
205 : olson 1.1 }
206 :    
207 :     sub configure_python
208 :     {
209 :     #
210 :     # Determine the PYTHONPATH we're to use.
211 :     #
212 :     # Right now, we don't compute a replacement for the system path,
213 :     # but we're likely going to require that *if* python is
214 :     # distributed with the environment. We're currently not doing that.
215 :     #
216 :     # So we just need to point to any python packages in the release,
217 :     # and to packages that were installed in the environment dir.
218 :     #
219 :    
220 :     my $python = find_python();
221 :     print "Found python at $python\n";
222 :    
223 :     my $py_version = `$python -c 'import sys; print "%d.%d" % (sys.version_info[:2])'`;
224 :     chomp $py_version;
225 :     print "Python version $py_version\n";
226 :    
227 : olson 1.2 $OtherConfig->{python_site_path} = "$ENV{FIGCONFIG_ENV_DIR}/lib/python$py_version/site-packages";
228 :    
229 : olson 1.1 my @path = ();
230 : olson 1.2 push(@path, $OtherConfig->{python_site_path});
231 :     push(@path, "$release_lib");
232 : olson 1.1 push(@path, "$fig_disk/config");
233 :     push(@$Env, ["PYTHONPATH", join(":", @path), 1]);
234 :    
235 :     $OtherConfig->{pythonpath} = join(":", @path);
236 :     }
237 :    
238 :     sub find_in_path
239 :     {
240 : olson 1.5 my($file, @extra) = @_;
241 : olson 1.1 my(@path) = split(":", $ENV{PATH});
242 :    
243 : olson 1.5 for my $p (@path, @extra)
244 : olson 1.1 {
245 :     my $x = "$p/$file";
246 :     if (-x $x)
247 :     {
248 :     return $x;
249 :     }
250 :     }
251 :     return undef;
252 :     }
253 :    
254 :     #
255 :     # Find the name of the python executable we are to use.
256 :     #
257 :     sub find_python
258 :     {
259 :     my $python;
260 :    
261 :     #
262 :     # Special case for the mac.
263 :     #
264 : olson 1.11 # RDO 20040603 - don't do this any more; we want to pick up
265 :     # the python we ship.
266 :     #
267 : olson 1.1
268 : olson 1.11 if (0 && $ENV{FIGCONFIG_ENV} eq "mac")
269 : olson 1.1 {
270 : olson 1.7 #
271 :     # We'd like to use the MacPython that is installed
272 :     # as pythonw.
273 :     #
274 :     if ($python = find_in_path("pythonw", "/usr/local/bin"))
275 : olson 1.1 {
276 : olson 1.7 $OtherConfig->{python_require_poundbang_env} = 1;
277 : olson 1.1 return $python;
278 :     }
279 :    
280 :     #
281 : olson 1.7 # Otherwise, we can live with the regular python.
282 :     # Fall thru to the generic case.
283 : olson 1.1 #
284 : olson 1.7 }
285 :     #
286 :     # Non-mac, just look in the env dir or the path.
287 :     #
288 : olson 1.1
289 : olson 1.7 $python = "$ENV{FIGCONFIG_ENV_DIR}/bin/python";
290 :     if (-x $python)
291 :     {
292 : olson 1.13 #
293 :     # The mac doesn't seem to like the long #! lines, so we'll use poundbang env.
294 :     #
295 : olson 1.15 if ($ENV{FIGCONFIG_ENV} =~ /^mac/)
296 : olson 1.13 {
297 :     $OtherConfig->{python_require_poundbang_env} = 1;
298 :     }
299 : olson 1.7 return $python;
300 : olson 1.1 }
301 :    
302 : olson 1.7 return find_in_path("python");
303 : olson 1.1 }
304 :    
305 :     #
306 :     # Find the name of the perl executable we are to use.
307 :     #
308 :     sub find_perl
309 :     {
310 :     my $perl;
311 :    
312 :     $perl = "$ENV{FIGCONFIG_ENV_DIR}/bin/perl";
313 :     if (-x $perl)
314 :     {
315 :     return $perl;
316 :     }
317 :    
318 :     warn "We did not find a perl executable in the SEED distribution; some modules may not be found\n";
319 :     return find_in_path("perl");
320 :     }
321 :    
322 :     sub write_bash_init
323 :     {
324 :     my($fh, $env) = @_;
325 :    
326 :     foreach my $item (@$env)
327 :     {
328 :     my($name, $value, $append) = @$item;
329 :    
330 :     if ($append)
331 :     {
332 :     #
333 :     # Write code to detect if the value is set, and act accordingly.
334 :     #
335 :    
336 :     print $fh <<END;
337 :     DELIM=
338 :     if [ -n "\$$name" ] ; then
339 :     DELIM=:
340 :     fi
341 : olson 1.10 $name=$value\${DELIM}\${$name}
342 : olson 1.1 export $name
343 :     END
344 :     }
345 :     else
346 :     {
347 :     print $fh "$name=\"$value\"\n";
348 :     print $fh "export $name\n";
349 :     }
350 :     }
351 :     }
352 :    
353 :     sub write_csh_init
354 :     {
355 :     my($fh, $env) = @_;
356 :    
357 :     foreach my $item (@$env)
358 :     {
359 :     my($name, $value, $append) = @$item;
360 :    
361 :     if ($append)
362 :     {
363 :     #
364 :     # Write code to detect if the value is set, and act accordingly.
365 :     #
366 :    
367 :     print $fh <<END;
368 :     if (\$?$name) then
369 : olson 1.10 setenv $name $value:\${$name}
370 : olson 1.1 else
371 :     setenv $name $value
372 :     endif
373 :     END
374 :     }
375 :     else
376 :     {
377 :     print $fh "setenv $name \"$value\"\n";
378 :     }
379 :     }
380 :    
381 :     }
382 :    
383 :     sub run_script
384 :     {
385 :     my($script) = @_;
386 :    
387 :    
388 :     unless (my $ret = do $script)
389 :     {
390 :     if ($@)
391 :     {
392 :     warn "Error parsing $script: $@\n";
393 :     }
394 :     elsif (!defined($ret))
395 :     {
396 :     warn "Couldn't do $script: $!\n";
397 :     }
398 :     else
399 :     {
400 :     warn "Counldn't run $script\n";
401 :     }
402 :     }
403 :    
404 :    
405 :     }
406 :    
407 :     sub configure_environment_specific
408 :     {
409 :     my $env_script = $ENV{FIGCONFIG_ENV_CONFIG};
410 :    
411 :     if (! -f $env_script)
412 :     {
413 :     warn "No environment-specific configuration file $env_script found, skipping\n";
414 :     return;
415 :     }
416 :    
417 :     run_script($env_script);
418 :     }
419 :    
420 :     #
421 :     # Create any directories that might be missing.
422 :     #
423 :    
424 :     sub setup_directories
425 :     {
426 :     my(@needed) = @_;
427 :    
428 :     for my $dir (@needed)
429 :     {
430 :     if (! -d $dir)
431 :     {
432 :     mkdir($dir) or warn "Could not create $dir: $!\n";
433 :     }
434 :     }
435 :     }
436 :    
437 :     sub setup_server_scripts
438 :     {
439 :     #
440 :     # Remove any start/stop servers scripts we might have, and write the stub
441 :     # start.
442 :     #
443 :    
444 :     unlink($start_servers);
445 :     unlink($stop_servers);
446 :    
447 :     open(F, ">$start_servers") or die "Cannot write $start_servers: $!";
448 :     print F "#!/bin/sh\n\n";
449 :     close(F);
450 :     chmod(0775, $start_servers);
451 :    
452 :     open(F, ">$stop_servers") or die "Cannot write $stop_servers: $!";
453 :     print F "#!/bin/sh\n\n";
454 :     close(F);
455 :     chmod(0775, $stop_servers);
456 :    
457 :     }
458 :    
459 : olson 1.7 sub finalize_server_scripts
460 :     {
461 :     #
462 :     # After any environment-specific stuff, call start_services and stop_services.
463 :     #
464 :    
465 :     open(F, ">>$start_servers") or die "Cannot write $start_servers: $!";
466 :     print F "\n$fig_bin/start_services\n";
467 :     close(F);
468 :     chmod(0775, $start_servers);
469 :    
470 :     open(F, ">>$stop_servers") or die "Cannot write $stop_servers: $!";
471 :     print F "\n$fig_bin/stop_services\n";
472 :     close(F);
473 :     chmod(0775, $stop_servers);
474 :    
475 :     }
476 :    
477 : olson 1.1 sub write_config_pm
478 :     {
479 :     my($fh, $config) = @_;
480 :    
481 :     print $fh "package FIG_Config;\n\n";
482 :    
483 :     foreach my $item (@$config)
484 :     {
485 :     my($name, $value, $quote) = @$item;
486 :    
487 :     my $q = $quote ? '"' : '';
488 :     printf $fh "\$%-15s = $q$value$q;\n", $name
489 :     }
490 :    
491 :     print $fh "\n1;\n";
492 :     }
493 :    
494 :     sub write_config_py
495 :     {
496 :     my($fh, $config) = @_;
497 :    
498 :     foreach my $item (@$config)
499 :     {
500 :     my($name, $value, $quote) = @$item;
501 :    
502 :     #
503 :     # Ugh. "global" is a keyword in python.
504 :     #
505 :    
506 :     $name = "global_dir" if $name eq "global";
507 :    
508 :     my $q = $quote ? '"' : '';
509 :     printf $fh "%-15s = $q$value$q\n", $name
510 :     }
511 :     }
512 :    
513 :     sub write_tool_hdr_perl
514 :     {
515 :     my($fh) = @_;
516 :    
517 :     my $perl = find_perl();
518 :    
519 :     print $fh "#!$perl\n";
520 :     print $fh "\n";
521 :    
522 :     if ($::perlenv_override)
523 :     {
524 :     #
525 :     # Write the tool header BEGIN block to reset the environment.
526 :     #
527 :    
528 :     print $fh "BEGIN {\n";
529 :     print $fh " \@INC = qw(\n";
530 :     for my $inc (@INC)
531 :     {
532 :     next if $inc eq '.';
533 :     print $fh "\t$inc\n";
534 :     }
535 : olson 1.2 print $fh ");\n";
536 : olson 1.1 print $fh "}\n";
537 :     }
538 :    
539 :     print $fh "use Data::Dumper;\n";
540 :     print $fh "use Carp;\n";
541 :    
542 : olson 1.2 #
543 :     # We generate a comment here that gets expanded by switch_to_release
544 :     # This is part of the effort in making the environment bootstrapping
545 :     # code independent of releases.
546 :     #
547 :    
548 :     #print $fh "use lib \"$release_lib\";\n";
549 :     #print $fh "use lib \"$release_lib/FigKernelPackages\";\n";
550 :    
551 :     print $fh "# Following block is expanded by switch_to_release to add use lib directives\n";
552 :     print $fh "# to point at the correct locations in the release directory.\n";
553 :     print $fh "#BEGIN switch_to_release generated code\n";
554 :     print $fh "#END switch_to_release generated code\n";
555 :     print $fh "\n";
556 :    
557 : olson 1.1 print $fh "use lib \"$fig_disk/config\";\n";
558 :    
559 :     print $fh "use FIG_Config;\n";
560 :     print $fh "\n";
561 : olson 1.11 print $fh "#### END tool_hdr ####\n\n"
562 : olson 1.1 }
563 :    
564 :     sub write_tool_hdr_python
565 :     {
566 :     my($fh) = @_;
567 :    
568 :     my $python = find_python();
569 :    
570 : olson 1.4 if ($OtherConfig->{python_require_poundbang_env})
571 :     {
572 :     print $fh "#!/usr/bin/env $python\n";
573 :     }
574 :     else
575 :     {
576 :     print $fh "#!$python\n";
577 :     }
578 : olson 1.1 print $fh "\n";
579 :    
580 : olson 1.11 print $fh "import sys, os\n";
581 : olson 1.2
582 :    
583 :     print $fh "sys.path.append('$OtherConfig->{python_site_path}')\n";
584 :    
585 : olson 1.11 #
586 :     # Append the perl path to the environment, for use later with CallPerl.
587 :     #
588 :    
589 : olson 1.14 my $perlpath = join(":", @INC, "$fig_disk/config", $release_lib, "$release_lib/FigKernelPackages");
590 : olson 1.11 print $fh <<END;
591 :     if os.getenv("PERL5LIB", "") != "":
592 :     _delim = ":"
593 :     else:
594 :     _delim = ""
595 :     os.environ["PERL5LIB"] = "$perlpath" + _delim + os.getenv("PERL5LIB", "")
596 :    
597 :     END
598 :    
599 : olson 1.2 print $fh "# Following block is expanded by switch_to_release to add use lib directives\n";
600 :     print $fh "# to point at the correct locations in the release directory.\n";
601 :     print $fh "#BEGIN switch_to_release generated code\n";
602 :     print $fh "#END switch_to_release generated code\n";
603 :     print $fh "\n";
604 :    
605 :     print $fh "sys.path.append('$fig_disk/config')\n";
606 :    
607 : olson 1.1 print $fh "import FIG_Config\n";
608 :     print $fh "\n";
609 : olson 1.11 print $fh "#### END tool_hdr_py ####\n\n"
610 : olson 1.1 }
611 :    
612 :     setup_directories("$fig_disk/bin",
613 :     "$fig_disk/config");
614 :    
615 :     setup_server_scripts();
616 :    
617 :    
618 :     find_python();
619 :    
620 :     compute_environment();
621 :     configure_std_fig_environment();
622 :     configure_python();
623 :     configure_environment_specific();
624 : olson 1.18 configure_database();
625 : olson 1.7
626 :     finalize_server_scripts();
627 : olson 1.1
628 :     #
629 :     # Write the shell startup to the figdisk.
630 :     #
631 :     open(FH, ">$fig_disk/config/fig-user-env.sh") or die "Cannot write $fig_disk/config/fig-user-env.sh: $!";
632 :     write_bash_init(\*FH, $Env);
633 :     close(FH);
634 :    
635 :     open(FH, ">$fig_disk/config/fig-user-env.csh") or die "Cannot write $fig_disk/config/fig-user-env.csh: $!";
636 :     write_csh_init(\*FH, $Env);
637 :     close(FH);
638 :    
639 :     #
640 :     # Write the FIG_Config file.
641 :     #
642 :    
643 :     open(FH, ">$fig_disk/config/FIG_Config.pm") or die "Cannot write $fig_disk/config/FIG_Config.pm: $!";
644 :     write_config_pm(\*FH, $Config);
645 :     close(FH);
646 :    
647 :     open(FH, ">$fig_disk/config/FIG_Config.py") or die "Cannot write $fig_disk/config/FIG_Config.py: $!";
648 :     write_config_py(\*FH, $Config);
649 :     close(FH);
650 :    
651 :     #
652 :     # Write the tool headers
653 :     #
654 :    
655 : olson 1.2 open(FH, ">$fig_disk/config/base_tool_hdr") or die "Cannot write $fig_disk/config/tool_hdr: $!";
656 : olson 1.1 write_tool_hdr_perl(\*FH);
657 :     close(FH);
658 :    
659 : olson 1.2 open(FH, ">$fig_disk/config/base_tool_hdr_py") or die "Cannot write $fig_disk/config/tool_hdr_py: $!";
660 : olson 1.1 write_tool_hdr_python(\*FH);
661 :     close(FH);
662 :    
663 : olson 1.2 unshift(@INC, "$ENV{FIGCONFIG_RELEASE_DIR}");
664 :    
665 :     require FigCommon::SwitchRelease;
666 : olson 1.1
667 : olson 1.16 #
668 :     # We need to tweak the current path and PERL5LIB environment to get bootstrapping to
669 :     # work correctly.
670 :     #
671 :    
672 :     $ENV{PATH} = "$ENV{FIGCONFIG_ENVDIR}/bin:$ENV{PATH}";
673 :    
674 : olson 1.17 $ENV{PERL5LIB} = (map { $_->[1] } grep { $_->[0] eq "PERL5LIB"} @$Env)[0];
675 : olson 1.16
676 : olson 1.2 &FigCommon::SwitchRelease::switch_to_release($fig_disk, $ENV{FIGCONFIG_ENV}, $ENV{FIGCONFIG_RELEASE});

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3