summaryrefslogtreecommitdiff
path: root/Master/install-tl.pl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-12-01 21:20:39 +0000
committerNorbert Preining <preining@logic.at>2007-12-01 21:20:39 +0000
commit27b8adaf50eb3cb5a25cfcdd39e30c2b2fc7a16c (patch)
treedbb41d7cc3fcc6a80f10d1116b021a2647b73c2a /Master/install-tl.pl
parent47b7d447b43d2170785aee624e6d63ba7c5f0c47 (diff)
new installer fixes (mixing net bins with CD bins didn't work)
git-svn-id: svn://tug.org/texlive/trunk@5665 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl.pl')
-rwxr-xr-xMaster/install-tl.pl57
1 files changed, 35 insertions, 22 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl
index fff14cd8c32..6722e8e1512 100755
--- a/Master/install-tl.pl
+++ b/Master/install-tl.pl
@@ -9,20 +9,16 @@
our $texlive_release="2008";
-# the location where this script resides, needs to be our
-# because it is used in TeXLive::TLUtils
-our $installerdir;
-
BEGIN {
$^W = 1;
my $me=$0;
$me=~s!\\!/!g if $^O=~/^MSWin(32|64)$/i;
if ($me=~m!/!) {
- ($installerdir=$me)=~s!(.*)/.*$!$1!;
+ ($::installerdir=$me)=~s!(.*)/.*$!$1!;
} else {
- $installerdir='.';
+ $::installerdir='.';
}
- unshift (@INC, "$installerdir/tlpkg");
+ unshift (@INC, "$::installerdir/tlpkg");
}
use TeXLive::TLUtils qw(initialize_installer media platform platform_desc
@@ -43,7 +39,8 @@ my %install;
# place where the profile should be saved
my $profilepath = './texlive.profile';
# if we should try to get additional binaries from the net
-my $trynet=0;
+# needs our since for menu ...
+our $trynet=0;
# the url of net location, can be changed with -url ....
my $texlive_url = 'http://tug.org/svn/texlive/trunk/Master';
# the default scheme to be installed
@@ -55,7 +52,7 @@ our @collections_lang;
our @collections_lang_doc;
# The maximum number of binary systems on the CD. This number must be
# smaller than the number of binaries available from the network.
-my $max_bins_on_CD=7;
+our $max_bins_on_CD=7;
# The global variable %vars is an associative list which contains all
# variables and their values which can be changed by the user.
# needs to be our since TeXLive::TLUtils uses it
@@ -107,7 +104,7 @@ if ("$opt_profile" ne "") {
if ("$opt_url" ne "") {
$texlive_url = "$opt_url";
}
-my $texlive_db_url="$texlive_url/$TeXLive::TLConfig::InfraLocation";
+$::texlive_db_url="$texlive_url/$TeXLive::TLConfig::InfraLocation";
# the TLPDB instances we will use. $tlpdb is for the one from the installation
# media, while $localtlpdb is for the new installation
@@ -120,7 +117,7 @@ my $system_tmpdir=get_system_tmpdir();
print "Platform: ", platform, " => \'", platform_desc(platform), "\'\n";
print "Media: ", media, "\n";
print "Directory for Temporary Files: '", $system_tmpdir, "\'\n";
-print "Installer Directory: '$installerdir'\n";
+print "Installer Directory: '$::installerdir'\n";
initialize_installer();
load_tlpdb();
@@ -373,7 +370,7 @@ sub load_tlpdb {
if (media eq 'NET') {
$database="$texlive_url/$TeXLive::TLConfig::InfraLocation/texlive.tlpdb";
} else {
- $database="$installerdir/$TeXLive::TLConfig::InfraLocation/texlive.tlpdb";
+ $database="$::installerdir/$TeXLive::TLConfig::InfraLocation/texlive.tlpdb";
}
print "Loading $database ...\n";
$tlpdb=TeXLive::TLPDB->new(location => "$database");
@@ -507,13 +504,29 @@ sub do_install_packages {
install_package(@allfiles);
} elsif (&media eq 'CD') {
my $container = "$package";
- if (-r "$installerdir/archive/$package.zip") {
+ if (-r "$::installerdir/archive/$package.zip") {
$container = "$package.zip";
- } elsif (-r "$installerdir/archive/$package.tar.lzma") {
+ } elsif (-r "$::installerdir/archive/$package.tar.lzma") {
$container = "$package.tar.lzma";
} else {
- # for now only warn and return, should (?) be die!?
- warn "Cannot find a package $package (.zip or .lzma) in $installerdir/archive\n";
+ # ok, it could be a binary package which should be installed from
+ # the net
+ my $donefromnet = 0;
+ foreach my $k (keys %vars) {
+ if ($k =~ m/^netbin_(.*)$/) {
+ my $a = $1;
+ if (($vars{$k}) && ($package =~ m/\.$a$/)) {
+ # ok this is a binary we should install from the net
+ install_package("$package.$TeXLive::TLConfig::DefaultContainerExtension");
+ $donefromnet = 1;
+ last;
+ }
+ }
+ }
+ if (!$donefromnet) {
+ # for now only warn and return, should (?) be die!?
+ warn "Cannot find a package $package (.zip or .lzma) in $::installerdir/archive\n";
+ }
next;
}
install_package($container);
@@ -559,8 +572,8 @@ sub parse_executes_and_create_files {
# fmtutil.cnf -> TEXMFSYSVAR/web2c
my @formatlines;
foreach my $f (keys %fmtcnffiles) {
- open(INFILE,"<$installerdir/texmf/fmtutil/format.$f.cnf")
- or die("Cannot open $installerdir/texmf/fmtutil/format.$f.cnf");
+ open(INFILE,"<$::installerdir/texmf/fmtutil/format.$f.cnf")
+ or die("Cannot open $::installerdir/texmf/fmtutil/format.$f.cnf");
my @tmp = <INFILE>;
close(INFILE);
push @formatlines, @tmp;
@@ -576,15 +589,15 @@ sub parse_executes_and_create_files {
# hyphenation patterns
my @languagelines = ();
# we first have to add language.us
- open(INFILE,"<$installerdir/texmf/tex/generic/config/language.us")
- or die("Cannot open $installerdir/texmf/tex/generic/config/language.us");
+ open(INFILE,"<$::installerdir/texmf/tex/generic/config/language.us")
+ or die("Cannot open $::installerdir/texmf/tex/generic/config/language.us");
my @tmp = <INFILE>;
close(INFILE);
push @languagelines, @tmp;
# now do the other languages
foreach my $f (keys %hypcnffiles) {
- open(INFILE,"<$installerdir/texmf/tex/generic/config/language.$f.dat")
- or die("Cannot open $installerdir/texmf/tex/generic/config/language.$f.dat");
+ open(INFILE,"<$::installerdir/texmf/tex/generic/config/language.$f.dat")
+ or die("Cannot open $::installerdir/texmf/tex/generic/config/language.$f.dat");
my @tmp = <INFILE>;
close(INFILE);
push @languagelines, @tmp;