summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-07-08 13:01:20 +0000
committerNorbert Preining <preining@logic.at>2008-07-08 13:01:20 +0000
commitaa119be73d73727e173789d45ee2a40bfe0e62c6 (patch)
treea470469e15442848b63bf162d3afb80305fbf69c
parent556c8fb15a545d032fe1bb0054304c96ae6ec282 (diff)
install-tl (and tlmgr and and):
- use -location as installation source selection tool - remove -media - remove various functions from TLUtils.pm . remove NetArchive/DiskArchive distinction, only TLUtils::Archive remains and that is "archive" git-svn-id: svn://tug.org/texlive/trunk@9361 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/install-tl113
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl23
-rw-r--r--Master/tlpkg/TeXLive/TLConfig.pm12
-rw-r--r--Master/tlpkg/TeXLive/TLMedia.pm14
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm164
-rwxr-xr-xMaster/tlpkg/bin/tl-update-containers6
6 files changed, 94 insertions, 238 deletions
diff --git a/Master/install-tl b/Master/install-tl
index e25a5334ec3..8ec18150c02 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -44,7 +44,7 @@ BEGIN {
use Getopt::Long qw(:config no_autoabbrev);
-use TeXLive::TLUtils qw(initialize_installer media platform platform_desc
+use TeXLive::TLUtils qw(platform platform_desc
which getenv win32 unix program_exists info log debug tlwarn ddebug
get_system_tmpdir member process_logging_options rmtree
mkdirhier make_var_skeleton make_local_skeleton install_package copy
@@ -139,9 +139,8 @@ our %vars=( # 'n_' means 'number of'.
);
# option handling
-my $opt_media = "";
my $opt_from_dvd = "";
-my $opt_url = "";
+my $opt_location = "";
my $opt_profile = "";
my $opt_no_cls=0;
my $opt_nogui = 0;
@@ -171,18 +170,16 @@ if (-r "installation.profile") {
# first process verbosity/quiet options
process_logging_options();
# now the others
-GetOptions("media=s" => \$opt_media,
+GetOptions(
"from_dvd" => \$opt_from_dvd,
"profile=s"=> \$opt_profile,
"no-cls",
"gui", \$opt_gui,
"no-gui", \$opt_nogui,
- "netarchive=s" => \$NetArchive,
- "diskarchive=s" => \$DiskArchive,
"lang=s" => \$::opt_lang,
"print-arch" => \$opt_arch,
"portable" => \$opt_portable,
- "url=s" => \$opt_url,
+ "location|url=s" => \$opt_location,
"version" => \$opt_version,
"help|?" => \$opt_help) or pod2usage(1);
@@ -218,14 +215,6 @@ if (defined($::opt_lang)) {
$::lang = $::opt_lang;
}
-if ("$opt_media" =~ m/^CD/i) {
- $::_media_ = "CD";
-} elsif ("$opt_media" =~ m/^NET/i) {
- $::_media_ = "NET";
-} elsif ("$opt_media" =~ m/^DVD/i) {
- $::_media_ = "DVD";
-}
-
if ("$opt_profile" ne "") {
if (-r "$opt_profile") {
info("Using automated installation using $opt_profile!");
@@ -252,6 +241,7 @@ my $finished = 0;
@::start_install_hook = ();
my $system_tmpdir=get_system_tmpdir();
+my $media;
# a couple of special uses of install-tl:
@@ -261,7 +251,7 @@ if ($opt_arch) {
} elsif ($opt_portable) {
$::opt_verbosity = -1;
# initialize_installer:
- $::_media_ = "DVD";
+ $media = "DVD";
$::_platform_ = platform();
$vars{'TEXDIR'} = getenv('TEXDIR');
if (not -d $vars{'TEXDIR'}.'/bin/'.$::_platform_) { # shouldn't happen
@@ -308,34 +298,60 @@ if ($opt_arch) {
# continuing with normal install
+# initialize the correct platform
+platform();
+setup_programs ("$::installerdir/tlpkg/installer", "$::_platform_");
+$ENV{'WGETRC'}="$::installerdir/tlpkg/installer/wgetrc";
+
+#
+# determine from where we do install
+#
+my $location = $opt_location;
+$location || ($location = "$::installerdir");
+if ($location =~ m!^(http|ftp)://!i) {
+ $location =~ s,/(tlpkg)?/*$,,; # remove any trailing tlpkg or /
+ $TeXLiveURL = $location;
+ $media = 'NET';
+} else {
+ # remove leading file:/+ part
+ $location =~ s!^file://*!/!i;
+ $location = abs_path($location);
+ if (-d "$location/$Archive") {
+ $media='CD';
+ } elsif (-d "$location/texmf/web2c") {
+ $media='DVD';
+ } else {
+ if ($opt_location) {
+ # user gave a --location but nothing can be found there, so die
+ die "Cannot find installation source at $opt_location!";
+ }
+ # no --location given, but NET installation
+ $TeXLiveURL = $location = TeXLive::TLUtils::give_ctan_mirror();
+ $media = 'NET';
+ }
+}
+
+
info("Platform: ", platform, " => \'", platform_desc(platform), "\'\n");
-if (media() eq "DVD") {
+if ($media eq "DVD") {
info("Distribution: live (uncompressed)\n");
-} elsif (media() eq "CD") {
+} elsif ($media eq "CD") {
info("Distribution: inst (compressed)\n");
-} elsif (media() eq "NET") {
+} elsif ($media eq "NET") {
info("Distribution: net (downloading)\n");
+ info("Using URL: $TeXLiveURL\n");
} else {
- info("Distribution: ", media(), "\n");
+ info("Distribution: $media\n");
}
info("Directory for temporary files: '", $system_tmpdir, "\'\n");
info("Installer directory: '$localpath'\n");
-initialize_installer();
-
-if ($opt_from_dvd and ($::_media_ ne "DVD")) {
+if ($opt_from_dvd and ($media ne "DVD")) {
print "Not running from DVD; 'from_dvd' option not applicable\n";
$opt_from_dvd = 0;
}
$vars{'from_dvd'} = $opt_from_dvd;
-setup_programs ("$::installerdir/tlpkg/installer", "$::_platform_");
-$opt_url =~ s,/(tlpkg)?/*$,, if $opt_url; # remove any trailing tlpkg or /
-
-if ($::_media_ eq "NET") {
- $TeXLiveURL = $opt_url || TeXLive::TLUtils::give_ctan_mirror();
- info("Using URL $TeXLiveURL\n");
-}
load_tlpdb();
log("Installer revision: $::installerrevision\n");
@@ -343,7 +359,7 @@ log("Database revision: " . $tlpdb->config_revision . "\n");
# correctly set the splitting support
# for DVD we always support splitting
-if ((media() eq "NET") || (media() eq "CD")) {
+if (($media eq "NET") || ($media eq "CD")) {
$vars{'src_splitting_supported'} = $tlpdb->config_src_container;
$vars{'doc_splitting_supported'} = $tlpdb->config_doc_container;
}
@@ -644,12 +660,7 @@ sub calc_depends {
}
sub load_tlpdb {
- my $master;
- if (media eq 'NET') {
- $master="$TeXLiveURL";
- } else {
- $master="$::installerdir";
- }
+ my $master = $location;
info("Loading $master/$TeXLive::TLConfig::InfraLocation/$TeXLive::TLConfig::DatabaseName\n");
$tlpdb=TeXLive::TLPDB->new(root => "$master");
if (!defined($tlpdb)) {
@@ -807,7 +818,7 @@ sub do_install_packages {
foreach my $package (sort keys %install) {
push @what, $package if ($install{$package} == 1);
}
- install_packages($tlpdb,$localtlpdb,\@what,$vars{'option_src'},$vars{'option_doc'});
+ install_packages($tlpdb,$media,$localtlpdb,\@what,$vars{'option_src'},$vars{'option_doc'});
}
# for later complete removal we want to save some options and values
@@ -815,8 +826,7 @@ sub do_install_packages {
# - should links be set, and if yes, the destination (bin,man,info)
sub save_options_into_tlpdb {
$localtlpdb->option_platform($::_platform_);
- $localtlpdb->option_location(
- (($::_media_ eq 'NET') ? "$TeXLiveURL" : abs_path($::installerdir)));
+ $localtlpdb->option_location($location);
$localtlpdb->option_paper($vars{'option_letter'} ? "letter" : "a4");
$localtlpdb->option_create_formats($vars{'option_fmt'} ? "1" : "0");
$localtlpdb->option_create_symlinks($vars{'option_symlinks'} ? "1" : "0");
@@ -1208,7 +1218,7 @@ sub do_cleanup
}
# remove temporary files from TEXDIR/temp
- if ((media() eq "CD") or (media() eq "NET")) {
+ if (($media eq "CD") or ($media eq "NET")) {
debug("Remove temporary downloaded containers!\n");
rmtree("$vars{'TEXDIRW'}/temp") if (-d "$vars{'TEXDIRW'}/temp");
}
@@ -1274,21 +1284,20 @@ the language specified by the 2-letter language code. Currently supported
languages: English (en, default), German (de), French (fr), Dutch (nl),
Polish (pl) and Slovenian (sl).
-=item B<-media> I<[CD|DVD|NET]>
-
-Override the autodetection of the media.
-
=item B<-profile> I<profile>
Load the I<profile> file for repeated installations on different systems.
-=item B<-url> I<url>
+=item B<-location> I<url|path>
-Override the default URL for network installs. Trailing C</> characters
+Provide an installation source. If the given argument is on the local
+drives (either a path or a file:/ url) the installation type (compressed
+or live) is automatically determined. Giving an http: or ftp: location
+trailing C</> characters
and/or a trailing C</tlpkg> component are ignored. For example, you
could choose a particular CTAN mirror with something like:
- -url http://ctan.example.org/tex-archive/texlive/tlnet/2008
+ -location http://ctan.example.org/tex-archive/texlive/tlnet/2008
Of course a proper hostname and its particular top-level CTAN path
have to be specified. (The list of CTAN mirrors is maintained at
@@ -1297,14 +1306,6 @@ L<http://ctan.org/mirrors>.)
The default is to pick a mirror automatically, using
L<http://mirror.ctan.org>; one mirror is used for the entire download.
-=item B<-netarchive> I<dir>
-
-Override the default settings for netarchive. Should be used with care.
-
-=item B<-diskarchive> I<dir>
-
-Override the default settings for diskarchive. Should be used with care.
-
=item B<-no-cls>
(only for text mode installer) do not clear the screen when entering
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 1bbb737294b..75a8bfb14ad 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -52,15 +52,11 @@ my $location;
my $opt_location;
my $opt_help = 0;
my $opt_version = 0;
-my $opt_netarchive;
-my $opt_diskarchive;
my $opt_gui = 0;
my $opt_gui_lang;
TeXLive::TLUtils::process_logging_options();
GetOptions("location=s" => \$opt_location,
- "netarchive=s" => \$opt_netarchive,
- "diskarchive=s" => \$opt_diskarchive,
"gui" => \$opt_gui,
"gui-lang=s" => \$opt_gui_lang,
"version" => \$opt_version,
@@ -91,9 +87,6 @@ if ($^O =~ /^MSWin(32|64)$/i) {
pod2usage(-exitstatus => 0, -verbose => 2) if $opt_help;
}
-$NetArchive = $opt_netarchive if (defined($opt_netarchive));
-$DiskArchive = $opt_diskarchive if (defined($opt_diskarchive));
-
my $loadmediasrcerror = "Cannot load TeX Live database from ";
my %ret;
@@ -676,9 +669,9 @@ EOF
tlwarn ("Creating updater from DVD currently not implemented!\n");
} else {
if ($media eq 'CD') {
- copy("$remoteroot/$DiskArchive/$pkg.tar.lzma", "$temp");
+ copy("$remoteroot/$Archive/$pkg.tar.lzma", "$temp");
} else { # net
- TeXLive::TLUtils::download_file("$remoteroot/$NetArchive/$pkg.tar.lzma", "$temp/$pkg.tar.lzma");
+ TeXLive::TLUtils::download_file("$remoteroot/$Archive/$pkg.tar.lzma", "$temp/$pkg.tar.lzma");
}
# now we should have the file present
if (! -r "$temp/$pkg.tar.lzma") {
@@ -996,10 +989,6 @@ sub action_gui {
if (defined($opt_gui_lang));
push @cmdline, "--location", "$opt_location"
if (defined($opt_location));
- push @cmdline, "--netarchive", "$opt_netarchive"
- if (defined($opt_netarchive));
- push @cmdline, "--diskarchive", "$opt_diskarchive"
- if (defined($opt_diskarchive));
if (defined($screen)) {
if (($screen eq "install") || ($screen eq "update")) {
push @cmdline, "--load";
@@ -1256,14 +1245,6 @@ Normally the GUI tries to deduce your language from the environment
you can select a different language by giving this option a two-letter
language code.
-=item B<--netarchive> I<dir>
-
-Overrides the default settings for netarchive. Should be used with care.
-
-=item B<--diskarchive> I<dir>
-
-Overrides the default settings for diskarchive. Should be used with care.
-
=back
The standard options are also accepted: B<--help/-h/-?>, B<--version>,
diff --git a/Master/tlpkg/TeXLive/TLConfig.pm b/Master/tlpkg/TeXLive/TLConfig.pm
index 41b31fcccb6..67f260a00f3 100644
--- a/Master/tlpkg/TeXLive/TLConfig.pm
+++ b/Master/tlpkg/TeXLive/TLConfig.pm
@@ -21,12 +21,10 @@ BEGIN {
$InfraLocation
$DatabaseName
$BlockSize
- $NetArchive
- $DiskArchive
+ $Archive
$TeXLiveServerURL
$TeXLiveServerPath
$TeXLiveURL
- $TeXLiveAlternativeURL
$WinSpecialUpdatePackagesRegexp
);
@EXPORT = @EXPORT_OK;
@@ -55,14 +53,11 @@ our $BlockSize = 4096;
# the way we package things on the web
our $DefaultContainerExtension = "tar.lzma";
-our $NetArchive = "tlpkg";
-our $DiskArchive = "archive";
+our $Archive = "archive";
our $TeXLiveServerURL = "http://mirror.ctan.org";
our $TeXLiveServerPath = "systems/texlive/tlnet/tldev";
our $TeXLiveURL = "$TeXLiveServerURL/$TeXLiveServerPath";
-our $TeXLiveAlternativeURL; # idea that didn't pan out
-
our $WinSpecialUpdatePackagesRegexp =
'^(texlive\.infra|luatex|bin-tlperl\.win32$|bin-texlive|bin-kpathsea)';
@@ -123,8 +118,7 @@ C<tlpkg>.
The assumed block size, currently 4k.
-=item C<$TeXLive::TLConfig::NetArchive>
-=item C<$TeXLive::TLConfig::DiskArchive>
+=item C<$TeXLive::TLConfig::Archive>
=item C<$TeXLive::TLConfig::TeXLiveURL>
These values specify where to find packages.
diff --git a/Master/tlpkg/TeXLive/TLMedia.pm b/Master/tlpkg/TeXLive/TLMedia.pm
index 71be3ea3dee..03fb7301bed 100644
--- a/Master/tlpkg/TeXLive/TLMedia.pm
+++ b/Master/tlpkg/TeXLive/TLMedia.pm
@@ -30,7 +30,7 @@ sub new
} else {
if (-d "$location/texmf/web2c") {
$media = 'DVD';
- } elsif (-d "$location/$DiskArchive") {
+ } elsif (-d "$location/$Archive") {
$media = 'CD';
} else {
# we cannot find the right type, return undefined, that should
@@ -143,17 +143,17 @@ sub install_package {
if ($media eq 'DVD') {
$container = \@installfiles;
} elsif ($media eq 'CD') {
- if (-r "$location/$DiskArchive/$pkg.zip") {
- $container = "$location/$DiskArchive/$pkg.zip";
- } elsif (-r "$location/$DiskArchive/$pkg.tar.lzma") {
- $container = "$location/$DiskArchive/$pkg.tar.lzma";
+ if (-r "$location/$Archive/$pkg.zip") {
+ $container = "$location/$Archive/$pkg.zip";
+ } elsif (-r "$location/$Archive/$pkg.tar.lzma") {
+ $container = "$location/$Archive/$pkg.tar.lzma";
} else {
# for now only warn and return, should (?) be die!?
- tlwarn("Cannot find a package $pkg (.zip or .lzma) in $location/$DiskArchive\n");
+ tlwarn("Cannot find a package $pkg (.zip or .lzma) in $location/$Archive\n");
next;
}
} elsif (&media eq 'NET') {
- $container = "$location/$NetArchive/$pkg.$DefaultContainerExtension";
+ $container = "$location/$Archive/$pkg.$DefaultContainerExtension";
}
$self->_install_package($container,\@installfiles,$totlpdb);
# if we are installing from CD or NET we have to fetch the respective
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index a3470b09a43..e337fe845d3 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -46,15 +46,13 @@ C<TeXLive::TLUtils> -- utilities used in the TeX Live infrastructure
=head2 Installer Functions
- TeXLive::TLUtils::media;
- TeXLive::TLUtils::initialize_installer;
TeXLive::TLUtils::make_var_skeleton($path);
TeXLive::TLUtils::make_local_skeleton($path);
TeXLive::TLUtils::create_fmtutil($tlpdb,$dest,$localconf);
TeXLive::TLUtils::create_updmap($tlpdb,$dest,$localconf);
TeXLive::TLUtils::create_language_dat($tlpdb,$dest,$localconf);
TeXLive::TLUtils::create_language_def($tlpdb,$dest,$localconf);
- TeXLive::TLUtils::install_packages($from_tlpdb,$to_tlpdb,$what,$opt_src, $opt_doc)>);
+ TeXLive::TLUtils::install_packages($from_tlpdb,$media,$to_tlpdb,$what,$opt_src, $opt_doc)>);
TeXLive::TLUtils::install_package($what, $filelistref, $target, $platform);
=head2 Miscellaneous
@@ -96,8 +94,6 @@ BEGIN {
&copy
&install_package
&install_packages
- &media
- &initialize_installer
&make_var_skeleton
&make_local_skeleton
&create_fmtutil
@@ -751,7 +747,7 @@ sub copy {
=pod
-=item C<install_packages($from_tlpdb, $to_tlpdb, $what, $opt_src, $opt_doc)>
+=item C<install_packages($from_tlpdb, $media, $to_tlpdb, $what, $opt_src, $opt_doc)>
Installs the list of packages found in C<@$what> (a ref to a list) into
the TLPDB given by C<$to_tlpdb>. Information on files are taken from
@@ -763,9 +759,10 @@ installed (currently implemented only for installation from DVD).
=cut
sub install_packages {
- my ($fromtlpdb,$totlpdb,$what,$opt_src,$opt_doc) = @_;
+ my ($fromtlpdb,$media,$totlpdb,$what,$opt_src,$opt_doc) = @_;
my $container_src_split = $fromtlpdb->config_src_container;
my $container_doc_split = $fromtlpdb->config_doc_container;
+ my $root = $fromtlpdb->root;
foreach my $package (@$what) {
info("Installing: $package\n");
foreach my $h (@::install_packages_hook) {
@@ -788,25 +785,25 @@ sub install_packages {
push @installfiles, $tlpobj->allbinfiles;
push @installfiles, $tlpobj->srcfiles if ($opt_src);
push @installfiles, $tlpobj->docfiles if ($real_opt_doc);
- if (&media eq 'DVD') {
- $container = \@installfiles;
- } elsif (&media eq 'CD') {
- if (-r "$::installerdir/$DiskArchive/$package.zip") {
- $container = "$::installerdir/$DiskArchive/$package.zip";
- } elsif (-r "$::installerdir/$DiskArchive/$package.tar.lzma") {
- $container = "$::installerdir/$DiskArchive/$package.tar.lzma";
+ if ($media eq 'DVD') {
+ $container = [ $root, @installfiles ];
+ } elsif ($media eq 'CD') {
+ if (-r "$root/$Archive/$package.zip") {
+ $container = "$root/$Archive/$package.zip";
+ } elsif (-r "$root/$Archive/$package.tar.lzma") {
+ $container = "$root/$Archive/$package.tar.lzma";
} else {
# for now only warn and return, should (?) be die!?
- tlwarn("Cannot find a package $package (.zip or .lzma) in $::installerdir/$DiskArchive\n");
+ tlwarn("Cannot find a package $package (.zip or .lzma) in $root/$Archive\n");
next;
}
- } elsif (&media eq 'NET') {
- $container = "$TeXLiveURL/$NetArchive/$package.$DefaultContainerExtension";
+ } elsif ($media eq 'NET') {
+ $container = "$root/$Archive/$package.$DefaultContainerExtension";
}
install_package($container, $tlpobj->containersize, $tlpobj->containermd5, \@installfiles,$totlpdb->root,$vars{'this_platform'});
# if we are installing from CD or NET we have to fetch the respective
# source and doc packages $pkg.source and $pkg.doc and install them, too
- if ((&media eq 'NET') || (&media eq 'CD')) {
+ if (($media eq 'NET') || ($media eq 'CD')) {
# we install split containers under the following conditions:
# - the container were split generated
# - src/doc files should be installed
@@ -888,12 +885,13 @@ sub install_package {
}
if (ref $what) {
# we are getting a ref to a list of files, so install from DVD
- foreach my $file (@$what) {
+ my ($root, @files) = @$what;
+ foreach my $file (@files) {
# @what is taken, not @filelist!
# is this still needed?
my $dn=dirname($file);
mkdirhier("$target/$dn");
- copy "$file", "$target/$dn";
+ copy "$root/$file", "$target/$dn";
}
} elsif ($what =~ m,\.tar.lzma$,) {
# this is the case when we install from CD or the NET
@@ -1010,8 +1008,8 @@ sub setup_programs {
if (!defined($platform) || ($platform eq "")) {
# we assume that we run from the DVD, so we can call platform() and
# thus also the config.guess script
- # but we have to setup $::installerdir because that stupid
- # platform script relies on it
+ # but we have to setup $::installerdir because the platform script
+ # relies on it
$::installerdir = "$bindir/../..";
$platform = platform();
}
@@ -1034,8 +1032,8 @@ sub setup_programs {
=item C<download_file( $relpath, $destination [, $progs ] )>
-Try to download the file given in C<$relpath> from either C<$TeXLiveURL>
-or C<TeXLiveAlternativeURL> into C<$destination>, which can be either
+Try to download the file given in C<$relpath> from C<$TeXLiveURL>
+into C<$destination>, which can be either
a filename of simply C<|>. In the latter case a file handle is returned.
The optional argument C<$progs> is a reference to a hash giving full pathes
@@ -1077,20 +1075,7 @@ sub download_file {
$url = "$TeXLiveURL/$relpath";
}
my $ret = _download_file($url, $dest, $wget);
- return($ret) if $ret;
- # if we have a full url given do NOT try an alternative url
- if ($relpath =~ /^(http|ftp):\/\//) {
- # we did get a full url, give up immediately
- return undef;
- }
- # we are still here ... try it with Alternative URL:
- return undef unless ($TeXLiveAlternativeURL);
- # we are still here and TeXLiveAlternativeURL is defined
- $url = "$TeXLiveAlternativeURL/$relpath";
- $ret = _download_file($url, $dest, $wget);
- return($ret) if $ret;
- # still not found, give up
- return undef;
+ return($ret);
}
sub _download_file {
@@ -1128,63 +1113,6 @@ sub _download_file {
}
}
-sub install_package_old {
-# either a list of files or a name of one .zip or .tar.lzma file.
- my @what=@_;
-
- my $target="$::vars{'TEXDIR'}";
- my $bindir="$::installerdir/tlpkg/bin";
- my $platform=&platform;
- my $buffer;
- my $offset;
- # shouldn't it be 4096
- my $blocksize=2048;
-
- #my $lzmadec="$bindir/lzmadec_$platform";
- my $lzmadec="lzmadec";
- my $tar="/bin/tar -xf - -C";
- my $wget="wget -nv -O-";
- if (win32) {
- $lzmadec="$bindir/lzma/lzma.exe -si -so";
- $tar="$bindir/tar.exe -xf - -C";
- $wget="$bindir/wget.exe -nv -O-";
- }
-
- if (&media eq 'DVD') {
- foreach my $file (@what) {
- my $dn=dirname($file);
- mkdirhier("$target/$dn");
- copy "$file", "$target/$dn";
- }
- } elsif (&media eq 'CD') {
- my $package="$::installerdir/$DiskArchive/$what[0]";
- open IN, "$package"
- or die "Can't open '$package': $!\n";
- binmode IN;
-
- open OUT, "|$lzmadec|$tar $target";
- binmode OUT;
-
- while ($read=sysread IN, $buffer, $blocksize) {
- die "system read error: $!\n" unless defined $read;
- $offset=0;
- while ($read) {
- $written=syswrite OUT, $buffer, $read, $offset;
- die "system write error: $!\n" unless defined $written;
- $read-=$written;
- $offset+=$written;
- }
- }
- close OUT;
- close IN;
- } elsif (&media eq 'NET') {
- my $package="$TeXLiveURL/$NetArchive/$what[0]";
- system "$wget $package|$lzmadec|$tar $target";
- } else {
- die "This can't happen.";
- }
-}
-
=pod
=back
@@ -1193,52 +1121,6 @@ sub install_package_old {
=over 6
-
-=item C<media>
-
-Return media type. Either C<CD>, C<DVD>, or C<NET>.
-
-The result is stored in a global variable C<$::_media_>. If you call
-C<media> repeatedly, only the first call of C<media> will access the
-CD/DVD.
-
-=cut
-
-sub media {
- unless (defined $::_media_) {
- if (-d "$::installerdir/$DiskArchive") {
- $::_media_='CD';
- } elsif (-d "$::installerdir/texmf/web2c") {
- $::_media_='DVD';
- } else {
- $::_media_='NET';
- }
- }
- return $::_media_;
-}
-
-=pod
-
-=item C<initialize_installer>
-
-The function C<initialize_installer> calls C<media> and C<platform> in
-order to set the variables C<$::_media_> and C<$::_platform_>.
-
-Note that C<$0> contains backslashes as path separators on Windows.
-
-Repeatedly calls to C<media> or C<platform> do not access the CD/DVD
-again.
-
-=cut
-
-sub initialize_installer {
- &media;
- &platform;
- $ENV{'WGETRC'}="$::installerdir/tlpkg/installer/wgetrc"
-}
-
-=pod
-
=item C<make_var_skeleton($prefix)>
Generate a skeleton of empty directories in the C<TEXMFSYSVAR> tree.
diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers
index 88995501604..c7db1489997 100755
--- a/Master/tlpkg/bin/tl-update-containers
+++ b/Master/tlpkg/bin/tl-update-containers
@@ -63,7 +63,7 @@ sub main
my @todopacks = ();
my @removepacks = ();
- my $opt_containerdir = "$opt_location/$TeXLive::TLConfig::NetArchive";
+ my $opt_containerdir = "$opt_location/$TeXLive::TLConfig::Archive";
my %count;
my $nettlpdb;
@@ -234,9 +234,7 @@ tl-update-containers [OPTION]...
=item B<-location> I</container/dir>
The location to find the previously generated containers;
-default is C<./tlpkg>. If this is changed so that the containers appear
-in a different directory on the net, then you need to also
-specify C<<--netarchive>> to C<install-tl.pl> or they will not be found.
+default is C<./archive>.
=back