summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-06-06 17:25:09 +0000
committerNorbert Preining <preining@logic.at>2009-06-06 17:25:09 +0000
commit0537d8cafcd1fcf772ccf90914d66af75e38954b (patch)
treeccb0a0e9d420c435c95008158c80b8e1d42c16d0 /Master/tlpkg/TeXLive
parent4aa3f4467e05c4ed9c8156d0f856c2bbca13b60e (diff)
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
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLMedia.pm5
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm15
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm5
3 files changed, 25 insertions, 0 deletions
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