diff options
author | Norbert Preining <preining@logic.at> | 2009-05-07 11:02:30 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-05-07 11:02:30 +0000 |
commit | 0890e85716c25cda9b197bd1195dcba20b819a5d (patch) | |
tree | ce88f55e26d0251ca8df49ecad6965d131e302c6 | |
parent | ddb7d0cdd66bcc4bdc547765939ecf7afbc60ebe (diff) |
fix TLMedia creating RELOC instead of texmf-dist, and remove included
tlpkg/tlpobj
git-svn-id: svn://tug.org/texlive/branches/branch2009-dev@12978 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/tlpkg/TeXLive/TLMedia.pm | 14 |
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"); |