summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/tlpkg/TeXLive/TLMedia.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/Master/tlpkg/TeXLive/TLMedia.pm b/Master/tlpkg/TeXLive/TLMedia.pm
index 0949365fe49..50d9ddbe8f6 100644
--- a/Master/tlpkg/TeXLive/TLMedia.pm
+++ b/Master/tlpkg/TeXLive/TLMedia.pm
@@ -180,6 +180,16 @@ sub install_package {
$doccontainer =~ s/(\.tar\.xz|\.zip)$/.doc$1/;
$self->_install_package($doccontainer,$reloc,\@installfiles,$totlpdb) || return(0);
}
+ #
+ # if we installed from NET/CD and we got a relocatable container
+ # make sure that the stray texmf-dist/tlpkg directory is removed
+ # in USER MODE that should NOT be done because we keep the information
+ # there, but for now do it unconditionally
+ if ($tlpobj->relocated) {
+ my $tlpod = $totlpdb->root . "/" . $TeXLive::TLConfig::RelocTree .
+ "/tlpkg/tlpobj";
+ rmtree($tlpod) if (-d $tlpod);
+ }
}
# we don't want to have wrong information in the tlpdb, so remove the
# src/doc files if they are not installed ...
@@ -251,7 +261,7 @@ sub _install_package {
} elsif ($what =~ m,\.tar(\.xz)?$,) {
my $type = defined($1) ? "xz" : "tar";
- $target .= "/$TeXLive::TLConfig::RelocPrefix" if $reloc;
+ $target .= "/$TeXLive::TLConfig::RelocTree" if $reloc;
# this is the case when we install from CD or the NET, or a backup
#
@@ -319,7 +329,7 @@ sub _install_package {
my $ret = TeXLive::TLUtils::untar($tarfile, $target, $remove_tarfile);
# remove the $pkg.tlpobj, we recreate it anyway again
unlink ("$target/tlpkg/tlpobj/$pkg.tlpobj")
- if (-r "$target/tlpkg/tlpobj/$pkg.tlpobj"):
+ if (-r "$target/tlpkg/tlpobj/$pkg.tlpobj");
return $ret;
} else {
tlwarn("_install_package: Don't know how to install $what\n");