summaryrefslogtreecommitdiff
path: root/Master/install-tl.pl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-12-03 17:29:03 +0000
committerNorbert Preining <preining@logic.at>2007-12-03 17:29:03 +0000
commit73c5ccf1eacaaf6057e330055ffa1b9965077f39 (patch)
tree324ef25ff9948c5edf3b8dc1cce8a68bae5c4d3c /Master/install-tl.pl
parentbe79c31adc58dd25d3bf67b062105456d5c16ab3 (diff)
factor out more of the install_package to TLUtils and make it
more or less generic. git-svn-id: svn://tug.org/texlive/trunk@5700 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl.pl')
-rwxr-xr-xMaster/install-tl.pl55
1 files changed, 13 insertions, 42 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl
index 653affbb69a..8a5d89a46b7 100755
--- a/Master/install-tl.pl
+++ b/Master/install-tl.pl
@@ -25,10 +25,10 @@ use TeXLive::TLUtils qw(initialize_installer media platform platform_desc
debug which getenv win32 unix program_exists architectures_available
additional_architectures_available_from_net get_system_tmpdir member
mkdirhier make_var_skeleton make_local_skeleton install_package copy
- create_fmtutil create_updmap create_language);
+ create_fmtutil create_updmap create_language install_packages);
use TeXLive::TLPOBJ;
use TeXLive::TLPDB;
-use TeXLive::TLConfig;
+use TeXLive::TLConfig qw($DefaultContainerExtension);
use Getopt::Long;
use strict;
@@ -490,51 +490,22 @@ sub prepare_installation {
$localtlpdb->root("$vars{'TEXDIR'}");
}
+
sub do_install_packages {
+ my @what;
foreach my $package (sort keys %install) {
- print "INSTALL $package\n" if ($install{$package} == 1);
- my $tlpobj=$tlpdb->get_package($package);
- if (&media eq 'DVD') {
- my @allfiles = $tlpobj->all_files;
- install_package(@allfiles);
- } elsif (&media eq 'CD') {
- my $container = "$package";
- if (-r "$::installerdir/$::diskarchive/$package.zip") {
- $container = "$package.zip";
- } elsif (-r "$::installerdir/$::diskarchive/$package.tar.lzma") {
- $container = "$package.tar.lzma";
- } else {
- # 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
- $::_media_ = 'NET';
- install_package("$package.$TeXLive::TLConfig::DefaultContainerExtension");
- $::_media_ = 'CD';
- $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/$::diskarchive\n";
- }
- next;
- }
- install_package($container);
- } elsif (&media eq 'NET') {
- install_package("$package.$TeXLive::TLConfig::DefaultContainerExtension");
+ push @what, $package if ($install{$package} == 1);
+ }
+ my @netarchs;
+ foreach my $k (keys %vars) {
+ if ($k =~ m/^netbin_(.*)$/) {
+ my $a = $1;
+ if ($vars{$k}) { push @netarchs, $a; }
}
- $localtlpdb->add_tlpobj($tlpobj);
}
- $localtlpdb->save;
+ install_packages($tlpdb,$localtlpdb,\@what,\@netarchs,$vars{'option_src'},$vars{'option_doc'});
}
-
+
# do_postinst_stuff has to fix up the texmf tree and install some missing
# files. The things to do are taken from the install-live.sh installer
# of former times, and should be critically checked.