diff options
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 6ccda6d597a..dce52e140dd 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -950,6 +950,7 @@ sub install_packages { my $starttime = time(); foreach my $package (@packs) { my $tlpobj = $tlpobjs{$package}; + my $reloc = $tlpobj->relocated; $n++; my $remtime = "??:??"; my $tottime = "??:??"; @@ -1016,7 +1017,7 @@ sub install_packages { } elsif ($media eq 'NET') { $container = "$root/$Archive/$package.$DefaultContainerExtension"; } - if (!install_package($container, $tlpobj->containersize, + if (!install_package($container, $reloc, $tlpobj->containersize, $tlpobj->containermd5, \@installfiles, $totlpdb->root, $vars{'this_platform'})) { # we already warn in install_package that something bad happened, @@ -1038,7 +1039,7 @@ sub install_packages { if ($container_src_split && $opt_src && $tlpobj->srcfiles) { my $srccontainer = $container; $srccontainer =~ s/(\.tar\.xz|\.zip)$/.source$1/; - if (!install_package($srccontainer, $tlpobj->srccontainersize, + if (!install_package($srccontainer, $reloc, $tlpobj->srccontainersize, $tlpobj->srccontainermd5, \@installfiles, $totlpdb->root, $vars{'this_platform'})) { return 0; @@ -1047,7 +1048,7 @@ sub install_packages { if ($container_doc_split && $real_opt_doc && $tlpobj->docfiles) { my $doccontainer = $container; $doccontainer =~ s/(\.tar\.xz|\.zip)$/.doc$1/; - if (!install_package($doccontainer, + if (!install_package($doccontainer, $reloc, $tlpobj->doccontainersize, $tlpobj->doccontainermd5, \@installfiles, $totlpdb->root, $vars{'this_platform'})) { @@ -1084,7 +1085,7 @@ sub install_packages { } -=item C<install_package($what, $size, $md5, $filelistref, $target, $platform)> +=item C<install_package($what, $reloc, $size, $md5, $filelistref, $target, $platform)> This function installs the files given in @$filelistref from C<$what> into C<$target>. @@ -1107,12 +1108,15 @@ file on the system and is likewise piped through C<xzdec> and C<tar>. In both of these cases currently the list C<$@filelistref> currently is not taken into account (should be fixed!). +if C<$reloc> is true the container (NET or CD mode) is packaged in a way +that the initial texmf-dist is missing. + Returns 1 on success and 0 on error. =cut sub install_package { - my ($what, $whatsize, $whatmd5, $filelistref, $target, $platform) = @_; + my ($what, $reloc, $whatsize, $whatmd5, $filelistref, $target, $platform) = @_; my @filelist = @$filelistref; @@ -1139,6 +1143,9 @@ sub install_package { # in all other cases we create temp files .tar.xz (or use the present # one), xzdec them, and then call tar + # if we are unpacking a relocated container we adjust the target + $target .= "/$TeXLive::TLConfig::RelocPrefix" if $reloc; + my $fn = basename($what); mkdirhier("$target/temp"); my $xzfile = "$target/temp/$fn"; |