From 0537d8cafcd1fcf772ccf90914d66af75e38954b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 6 Jun 2009 17:25:09 +0000 Subject: before saving a tlpobj to a local tlpdb we have to remove the RELOC prefix, or the creation of the containers breaks git-svn-id: svn://tug.org/texlive/trunk@13648 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLMedia.pm | 5 +++++ Master/tlpkg/TeXLive/TLPOBJ.pm | 15 +++++++++++++++ Master/tlpkg/TeXLive/TLUtils.pm | 5 +++++ 3 files changed, 25 insertions(+) (limited to 'Master') diff --git a/Master/tlpkg/TeXLive/TLMedia.pm b/Master/tlpkg/TeXLive/TLMedia.pm index b79663dfbf7..f60462bc82e 100644 --- a/Master/tlpkg/TeXLive/TLMedia.pm +++ b/Master/tlpkg/TeXLive/TLMedia.pm @@ -208,6 +208,11 @@ sub install_package { if (!$real_opt_doc) { $tlpobj->clear_docfiles; } + # if a package is relocatable we have to cancel the reloc prefix + # before we save it to the local tlpdb + if ($tlpobj->relocated) { + $tlpobj->cancel_reloc_prefix; + } # we have to write out the tlpobj file since it is contained in the # archives (.tar.xz) but at DVD install time we don't have them my $tlpod = $totlpdb->root . "/tlpkg/tlpobj"; diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 9e1bd093fa7..f86195252ee 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -440,6 +440,21 @@ sub writeout_simple { } } +sub cancel_reloc_prefix { + my $self = shift; + my @docfiles = $self->docfiles; + for (@docfiles) { s:^$RelocPrefix/:$RelocTree/:; } + $self->docfiles(@docfiles); + my @runfiles = $self->runfiles; + for (@runfiles) { s:^$RelocPrefix/:$RelocTree/:; } + $self->runfiles(@runfiles); + my @srcfiles = $self->srcfiles; + for (@srcfiles) { s:^$RelocPrefix/:$RelocTree/:; } + $self->srcfiles(@srcfiles); + # if there are bin files they have definitely NOT the + # texmf-dist prefix, so we cannot cancel it anyway +} + sub cancel_common_texmf_tree { my $self = shift; my @docfiles = $self->docfiles; diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 3f61fea0998..78f622506dd 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -1167,6 +1167,11 @@ sub install_packages { if (!$real_opt_doc) { $tlpobj->clear_docfiles; } + # if a package is relocatable we have to cancel the reloc prefix + # before we save it to the local tlpdb + if ($tlpobj->relocated) { + $tlpobj->cancel_reloc_prefix; + } $totlpdb->add_tlpobj($tlpobj); # we have to write out the tlpobj file since it is contained in the # archives (.tar.xz) but at DVD install time we don't have them -- cgit v1.2.3