diff options
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/install-tl.bat | 3 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 79 | ||||
-rwxr-xr-x | Master/tlpkg/bin/lzmadec.win32.exe | bin | 12288 -> 12288 bytes |
3 files changed, 43 insertions, 39 deletions
diff --git a/Master/install-tl.bat b/Master/install-tl.bat index dadbbe4f0ba..44db44c5b51 100755 --- a/Master/install-tl.bat +++ b/Master/install-tl.bat @@ -9,6 +9,7 @@ set tldrive=%~d0 cd %tlroot%
rem we need wget in the path, so add tlpkg\bin to the path
+set pathsave=%path%
path %path%;%tlroot%tlpkg\bin
rem use provided Perl
@@ -23,5 +24,7 @@ rem cleanup in case of start from command-line set PERL5LIB=%PERL5SAVE%
set PERL5SAVE=
+path %pathsave%
+set pathsave=
set tldrive=
set tlroot=
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 42bf05d1278..72a69c17e1f 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -145,7 +145,7 @@ the HD/CD/DVD. sub platform { my @OSs=qw(aix cygwin darwin freebsd hpux irix linux netbsd openbsd - solaris); + solaris); unless (defined $::_platform_) { if ($^O=~/^MSWin(32|64)$/i) { @@ -164,7 +164,7 @@ sub platform { } if ($CPU=~/^i.86$/) { $CPU=~s/i.86/i386/; - } + } if (length "$OS" < 0) { ($OS=$guessed_platform)=~s/.*-(.*)/$1/; } @@ -217,7 +217,7 @@ sub platform_desc { } } -=pod +=pod =item C<win32> @@ -309,11 +309,11 @@ sub which { return "$dir/$prog"; } } - } + } return 0; } -=pod +=pod =item C<program_exists($program)> @@ -470,19 +470,19 @@ sub copy { $filename=basename "$infile"; $outfile="$destdir/$filename"; - + if (-l "$infile") { symlink readlink "$infile", "$destdir/$filename"; } else { open IN, "$infile" or die "Can't open '$infile': $!\n"; binmode IN; - + $mode=(-x "$infile")? oct("0777"):oct("0666"); $mode-=umask; - + open OUT, ">$outfile" or die "Can't open '$outfile': $!\n"; binmode OUT; - + chmod $mode, "$outfile"; while ($read=sysread IN, $buffer, $blocksize) { @@ -494,7 +494,7 @@ sub copy { $read-=$written; $offset+=$written; } - } + } close OUT; close IN; @stat=lstat "$infile"; @@ -506,14 +506,14 @@ sub copy { =item C<install_packages($from_tlpdb, $to_tlpdb, $what, $netarchsref, $opt_src, $opt_doc)> -Installs the list of packages found in C<@$what> (a ref to a list) into +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>. C<$netarchrefs> is a reference to a list of arch/os combination which should -be installed from the network. +be installed from the network. -C<$opt_src> and C<$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 @@ -524,6 +524,7 @@ sub install_packages { my $container_doc_split = $fromtlpdb->config_doc_container; foreach my $package (@$what) { tllog($::LOG_NORMAL, "Installing: $package\n"); + print ((join "\n",@::install_packages_hook)."\n"); foreach my $h (@::install_packages_hook) { &$h("Installing: $package"); } @@ -574,13 +575,13 @@ sub install_packages { # - src/doc files should be installed # - the package is not already a split one (like .i386-linux) # - there are actually src/doc files present - if ($container_src_split && $opt_src && + if ($container_src_split && $opt_src && ($package !~ m/\./) && $tlpobj->srcfiles) { my $srccontainer = $container; $srccontainer =~ s/(.tar.lzma|.zip)/.source$1/; install_package($srccontainer,\@installfiles,$totlpdb->root,$vars{'this_platform'}); } - if ($container_doc_split && $opt_doc && + if ($container_doc_split && $opt_doc && ($package !~ m/\./) && $tlpobj->docfiles) { my $doccontainer = $container; $doccontainer =~ s/(.tar.lzma|.zip)/.doc$1/; @@ -597,7 +598,7 @@ sub install_packages { } $totlpdb->add_tlpobj($tlpobj); } - $totlpdb->save; + $totlpdb->save; } =pod @@ -634,9 +635,9 @@ sub install_package { my $buffer; my $offset; my $blocksize=2048; - + $blocksize=4096 if ($::_media_ eq 'NET'); - + my @filelist = @$filelistref; my $bindir = "$::installerdir/tlpkg/bin"; @@ -658,7 +659,7 @@ sub install_package { my $dn=dirname($file); mkdirhier("$target/$dn"); copy "$file", "$target/$dn"; - } + } } elsif ($what =~ m,http://|ftp://,) { # we are installing from the NET # currently the list of file @filelist is NOT EVALUATED!!! @@ -688,7 +689,7 @@ sub install_package { $tarfile =~ s/\.lzma$//; mkdirhier("$target/temp"); tllog($::LOG_DEBUG, "Un-lzmaing $what to $target\\temp\\$tarfile\n"); - tllog($::LOG_DEBUG, `type \"$what\" | $lzmadec > \"$target\\temp\\$tarfile\" 2>&1`); + tllog($::LOG_DEBUG, `$lzmadec < \"$what\" > \"$target\\temp\\$tarfile\" 2>&1`); tllog($::LOG_DEBUG, "Unpacking temp\\$tarfile\n"); tllog($::LOG_DEBUG, `pushd \"$target\" & $tar -xf \"temp\\$tarfile\" 2>&1`); unlink("$target\\temp\\$tarfile"); @@ -729,16 +730,16 @@ sub install_package_old { 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 warn "Can't open '$package': $!\n" 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; @@ -748,7 +749,7 @@ sub install_package_old { $read-=$written; $offset+=$written; } - } + } close OUT; close IN; } elsif (&media eq 'NET') { @@ -845,7 +846,7 @@ sub architectures_available { } return @platforms; } - + =pod =item C<additional_architectures_available_from_net (\%vars)> @@ -857,7 +858,7 @@ creates a new object c<$::tlpdb_netbin>. The argument is a reference of the global C<%vars> hash. =cut - + sub additional_architectures_available_from_net { my $vars=shift; my @platforms; @@ -968,7 +969,7 @@ sub create_fmtutil { push @lines, @tmp; } if ($#lines >= 0) { - open(OUTFILE,">$dest") + open(OUTFILE,">$dest") or die("Cannot open $dest for writing: $!"); if (win32()) { print OUTFILE "# Generated by $0 on some unknown date\n"; @@ -988,13 +989,13 @@ sub create_updmap { # # this should be done more intelligently, but for now only add those # lines without any duplication check ... - open FOO, "<$localconf" + open FOO, "<$localconf" or die "strange, -r ok but cannot open $localconf: $!"; my @tmp = <FOO>; push @lines, @tmp; } if ($#lines >= 0) { - open(OUTFILE,">$dest") + open(OUTFILE,">$dest") or die("Cannot open $dest for writing: $!"); if (win32()) { print OUTFILE "# Generated by $0 on unknown date\n"; @@ -1014,13 +1015,13 @@ sub create_language { # # this should be done more intelligently, but for now only add those # lines without any duplication check ... - open FOO, "<$localconf" + open FOO, "<$localconf" or die "strange, -r ok but cannot open $localconf: $!"; my @tmp = <FOO>; push @lines, @tmp; } if ($#lines >= 0) { - open(OUTFILE,">$dest") + open(OUTFILE,">$dest") or die("Cannot open $dest for writing: $!"); if (win32()) { print OUTFILE "% Generated by $0 on some unknown date\n"; @@ -1169,7 +1170,7 @@ sub _tllog { =item C<kpsewhich($varname)> This function expands the variable name using kpsewhich. The variable -name should not have a leading $. The kpsewhich binary has to be in +name should not have a leading $. The kpsewhich binary has to be in the path. =cut @@ -1177,17 +1178,17 @@ the path. sub kpsewhich { my $var = shift; my $ret = `kpsewhich -var-value=$var`; - chomp ($ret); + chomp ($ret); return($ret); } -=pod +=pod =item C<conv_to_win_path($path)> This function returns a "windowsified" path, i.e., replacing all forward -slashes to backslashes, and adding additional " around (in case of spaces -in $path). Furthermore it makes the path absolute. So if $path does not +slashes to backslashes, and adding additional " around (in case of spaces +in $path). Furthermore it makes the path absolute. So if $path does not start with an arbitrary char followed by : we add the output of `cd`. =cut @@ -1233,7 +1234,7 @@ sub parse_line { \1 # followed by the same quote | # --OR-- ^((?:\\.|[^\\"'])*?) # an $unquoted text - (\Z(?!\n)|(?-x:$delimiter)|(?!^)(?=["'])) + (\Z(?!\n)|(?-x:$delimiter)|(?!^)(?=["'])) # plus EOL, delimiter, or quote //xs or return; # extended layout my($quote, $quoted, $unquoted, $delim) = ($1, $2, $3, $4); @@ -1250,7 +1251,7 @@ sub parse_line { } $word .= substr($line, 0, 0); # leave results tainted $word .= defined $quote ? $quoted : $unquoted; - + if (length($delim)) { push(@pieces, $word); push(@pieces, $delim) if ($keep eq 'delimiters'); @@ -1270,7 +1271,7 @@ sub parse_line { =head1 SEE ALSO -The modules L<TeXLive::TLPSRC>, L<TeXLive::TLPOBJ>, +The modules L<TeXLive::TLPSRC>, L<TeXLive::TLPOBJ>, L<TeXLive::TLPDB>, L<TeXLive::TLTREE>, and the document L<Perl-API.txt> and the specification in the TeX Live repository trunk/Master/tlpkg/doc/. diff --git a/Master/tlpkg/bin/lzmadec.win32.exe b/Master/tlpkg/bin/lzmadec.win32.exe Binary files differindex 80f36f18308..f91c8eb26b5 100755 --- a/Master/tlpkg/bin/lzmadec.win32.exe +++ b/Master/tlpkg/bin/lzmadec.win32.exe |