diff options
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r-- | systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm index ce00df5bf7..ba86ac2097 100644 --- a/systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm +++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm @@ -1,4 +1,4 @@ -# $Id: TLPDB.pm 53820 2020-02-17 03:23:13Z preining $ +# $Id: TLPDB.pm 54630 2020-04-06 11:49:32Z preining $ # TeXLive::TLPDB.pm - tlpdb plain text database files. # Copyright 2007-2020 Norbert Preining # This file is licensed under the GNU General Public License version 2 @@ -6,7 +6,7 @@ package TeXLive::TLPDB; -my $svnrev = '$Revision: 53820 $'; +my $svnrev = '$Revision: 54630 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -1775,11 +1775,20 @@ sub not_virtual_install_package { } } my $media = $self->media; + my $container_is_versioned = 0; if ($media eq 'local_uncompressed') { $container = \@installfiles; } elsif ($media eq 'local_compressed') { for my $ext (map { $Compressors{$_}{'extension'} } keys %Compressors) { - if (-r "$root/$Archive/$pkg.tar.$ext") { + # request versioned containers when local (i.e., ISO image), + # since the unversioned symlinks cannot be dereferenced + # on Windows. + my $rev = $tlpobj->revision; + if (-r "$root/$Archive/$pkg.r$rev.tar.$ext") { + $container_is_versioned = 1; + $container = "$root/$Archive/$pkg.r$rev.tar.$ext"; + } elsif (-r "$root/$Archive/$pkg.tar.$ext") { + $container_is_versioned = 0; $container = "$root/$Archive/$pkg.tar.$ext"; } } @@ -1789,8 +1798,11 @@ sub not_virtual_install_package { return(0); } } elsif (&media eq 'NET') { + # Since the NET server cannot be a Windows machine, + # ok to request the unversioned file. $container = "$root/$Archive/$pkg.tar." . $Compressors{$DefaultCompressorFormat}{'extension'}; + $container_is_versioned = 0; } my $container_str = ref $container eq "ARRAY" ? "[" . join (" ", @$container) . "]" : $container; @@ -1816,14 +1828,22 @@ sub not_virtual_install_package { # - there are actually src/doc files present if ($container_src_split && $opt_src && $tlpobj->srcfiles) { my $srccontainer = $container; - $srccontainer =~ s/\.tar\.$CompressorExtRegexp$/.source.tar.$1/; + if ($container_is_versioned) { + $srccontainer =~ s/\.(r[0-9]*)\.tar\.$CompressorExtRegexp$/.source.$1.tar.$2/; + } else { + $srccontainer =~ s/\.tar\.$CompressorExtRegexp$/.source.tar.$1/; + } $self->_install_data($srccontainer, $reloc, \@installfiles, $totlpdb, $tlpobj->srccontainersize, $tlpobj->srccontainerchecksum) || return(0); } if ($container_doc_split && $real_opt_doc && $tlpobj->docfiles) { my $doccontainer = $container; - $doccontainer =~ s/\.tar\.$CompressorExtRegexp$/.doc.tar.$1/; + if ($container_is_versioned) { + $doccontainer =~ s/\.(r[0-9]*)\.tar\.$CompressorExtRegexp$/.doc.$1.tar.$2/; + } else { + $doccontainer =~ s/\.tar\.$CompressorExtRegexp$/.doc.tar.$1/; + } $self->_install_data($doccontainer, $reloc, \@installfiles, $totlpdb, $tlpobj->doccontainersize, $tlpobj->doccontainerchecksum) || return(0); |