From 279a3efa74f8b66c4a46e679bc9d2c2e9cd44a39 Mon Sep 17 00:00:00 2001 From: Manuel Pégourié-Gonnard Date: Wed, 24 Feb 2010 16:05:26 +0000 Subject: Avoid loosing docfiledata when relocating packages. git-svn-id: svn://tug.org/texlive/trunk@17183 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPOBJ.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 877ab312a00..b867ab7b4a0 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -467,6 +467,14 @@ sub cancel_reloc_prefix { my @srcfiles = $self->srcfiles; for (@srcfiles) { s:^$RelocPrefix/:$RelocTree/:; } $self->srcfiles(@srcfiles); + # docfiledata needs to be adapted too + my $data = $self->docfiledata; + my %newdata; + while (my ($k, $v) = each %$data) { + $k =~ s:^$RelocPrefix/:$RelocTree/:; + $newdata{$k} = $v; + } + $self->docfiledata(%newdata); # if there are bin files they have definitely NOT the # texmf-dist prefix, so we cannot cancel it anyway } @@ -482,6 +490,14 @@ sub cancel_common_texmf_tree { my @srcfiles = $self->srcfiles; for (@srcfiles) { s:^$RelocTree/:$RelocPrefix/:; } $self->srcfiles(@srcfiles); + # docfiledata needs to be adapted too + my $data = $self->docfiledata; + my %newdata; + while (my ($k, $v) = each %$data) { + $k =~ s:^$RelocTree/:$RelocPrefix/:; + $newdata{$k} = $v; + } + $self->docfiledata(%newdata); # if there are bin files they have definitely NOT the # texmf-dist prefix, so we cannot cancel it anyway } -- cgit v1.2.3