summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinhard Kotucha <reinhard.kotucha@web.de>2007-12-09 00:53:58 +0000
committerReinhard Kotucha <reinhard.kotucha@web.de>2007-12-09 00:53:58 +0000
commitab261ec659ebd5da74ca399618a5093545f50b39 (patch)
treee71f060f17fad817aa65a7cce098582a822fe937
parent06d1699d30f4eaed1cbaf4166d182472ebc346e6 (diff)
TLUtils.pm: mkdirhier and POD improved
git-svn-id: svn://tug.org/texlive/trunk@5732 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm46
1 files changed, 25 insertions, 21 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index d45f33c0b2b..e2e5341da85 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -403,6 +403,7 @@ sub mkdirhier {
my $mode=shift;
my $subdir;
+ return if (-d "$tree");
@dirs=split /\//, $tree;
foreach $dir (@dirs) {
$subdir .= ("$dir" . "/");
@@ -482,16 +483,16 @@ sub copy {
=pod
-=item C<install_packages($from_tlpdb,$to_tlpdb,$what,$netarchsref,$opt_src,$opt_doc);>
+=item C<install_packages($from_tlpdb, $to_tlpdb, $what, $netarchsref, $opt_src, $opt_doc)>
-Installs the list of packages found in @$what (a ref to a list) into
-the TLPDB given by $to_tlpdb. Information on files are taken from
-the TLPDB $from_tlpdb.
+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
+the TLPDB C<$from_tlpdb>.
-$netarchrefs is a reference to a list of arch/os combination which should
+C<$netarchrefs> is a reference to a list of arch/os combination which should
be installed from the network.
-$opt_src and $opt_doc specify whether srcfiles and docfiles should be
+C<$opt_src> and C<$opt_doc> specify whether srcfiles and docfiles should be
installed (currently implemented only for installation from DVD).
=cut
@@ -546,23 +547,24 @@ sub install_packages {
=pod
-=item C<install_package($what, $filelistref, $target, $platform);>
+=item C<install_package($what, $filelistref, $target, $platform)>
-This function installs the files given in @$filelistref from $what
-into $target.
+This function installs the files given in @$filelistref from C<$what>
+into C<$target>.
-If $what is a reference to a list of files then these files are assumed
-to be readable and are copied to $target, creating dirs on the way. In this
-case the list @$filelistref is not taken into account.
+If C<$what> is a reference to a list of files then these files are
+assumed to be readable and are copied to C<$target>, creating dirs on
+the way. In this case the list C<@$filelistref> is not taken into
+account.
-If $what starts with http:// of ftp:// then $what is downloaded from the
-net and piped through lzmadec and tar.
+If C<$what> starts with C<http://> or C<ftp://> then C<$what> is
+downloaded from the net and piped through c<lzmadec> and C<tar>.
-If $what ends with .tar.lzma (but does not start with http:// or ftp://)
-it is assumed to be a readable file on the system and is piped through
-lzmadec and tar in the very same way.
+If $what ends with C<.tar.lzma> (but does not start with C<http://> or
+C<ftp://>) it is assumed to be a readable file on the system and is
+piped through C<lzmadec> and C<tar> in the very same way.
-In both of the last cases currently the list $@filelistref currently
+In both of the last cases currently the list C<$@filelistref> currently
is not taken into account (should be fixed!).
=cut
@@ -571,8 +573,11 @@ sub install_package {
my ($what, $filelistref, $target, $platform) = @_;
my $buffer;
my $offset;
- # shouldn't it be 4096
- my $blocksize=2048;
+ if ($::_media_ eq 'NET') {
+ my $blocksize=4096;
+ } else {
+ my $blocksize=2048;
+ }
my @filelist = @$filelistref;
my $bindir = "$::installerdir/tlpkg/bin";
@@ -1083,7 +1088,6 @@ sub parse_line {
}
-############################################
=pod
=back