From 60aa6779744c7c0bf4dc2fa08c5f7bc29d224ffd Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 18 May 2008 15:01:38 +0000 Subject: TLMedia, TLUtils: install docfiles even if opt_doc = 0 for packages of category Documentation. For these packages it would be useless to exclude docfiles. git-svn-id: svn://tug.org/texlive/trunk@8205 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLMedia.pm | 12 +++++++++--- Master/tlpkg/TeXLive/TLUtils.pm | 13 ++++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) (limited to 'Master') diff --git a/Master/tlpkg/TeXLive/TLMedia.pm b/Master/tlpkg/TeXLive/TLMedia.pm index bddbdd529fd..f1eb9062e45 100644 --- a/Master/tlpkg/TeXLive/TLMedia.pm +++ b/Master/tlpkg/TeXLive/TLMedia.pm @@ -106,6 +106,12 @@ sub install_package { # get options about src/doc splitting from $totlpdb my $opt_src = $totlpdb->option_srcfiles; my $opt_doc = $totlpdb->option_docfiles; + my $real_opt_doc = $opt_doc; + if ($tlpobj->category =~ m/documentation/i) { + # we do install documenation files for category Documentation + # even if opt_doc is false + $real_opt_doc = 1; + } tllog($::LOG_NORMAL, "install: $pkg\n"); foreach my $h (@::install_packages_hook) { &$h("install: $package"); @@ -127,7 +133,7 @@ sub install_package { push @installfiles, $_; } } - if ($opt_doc) { + if ($real_opt_doc) { foreach ($tlpobj->docfiles) { # s!^!$location/!; push @installfiles, $_; @@ -164,7 +170,7 @@ sub install_package { $srccontainer =~ s/(\.tar\.lzma|\.zip)$/.source$1/; $self->_install_package($srccontainer,\@installfiles,$totlpdb); } - if ($container_doc_split && $opt_doc && + if ($container_doc_split && $real_opt_doc && ($pkg !~ m/\./) && $tlpobj->docfiles) { my $doccontainer = $container; $doccontainer =~ s/(\.tar\.lzma|\.zip)$/.doc$1/; @@ -176,7 +182,7 @@ sub install_package { if (!$opt_src) { $tlpobj->clear_srcfiles; } - if (!$opt_doc) { + if (!$real_opt_doc) { $tlpobj->clear_docfiles; } # we have to write out the tlpobj file since it is contained in the diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index bd61074410b..129c0576406 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -530,12 +530,19 @@ sub install_packages { if (!defined($tlpobj)) { die "STRANGE: $package not to be found in ", $fromtlpdb->root; } + my $real_opt_doc = $opt_doc; + # if we install a package from the Documentation class we + # reactivate the do_doc in any case. It should apply ONLY for fonts + # and macros! + if ($tlpobj->category =~ m/documentation/i) { + $real_opt_doc = 1; + } my $container; my @installfiles; push @installfiles, $tlpobj->runfiles; push @installfiles, $tlpobj->allbinfiles; push @installfiles, $tlpobj->srcfiles if ($opt_src); - push @installfiles, $tlpobj->docfiles if ($opt_doc); + push @installfiles, $tlpobj->docfiles if ($real_opt_doc); if (&media eq 'DVD') { $container = \@installfiles; } elsif (&media eq 'CD') { @@ -566,7 +573,7 @@ sub install_packages { $srccontainer =~ s/(\.tar\.lzma|\.zip)$/.source$1/; install_package($srccontainer,\@installfiles,$totlpdb->root,$vars{'this_platform'}); } - if ($container_doc_split && $opt_doc && + if ($container_doc_split && $real_opt_doc && ($package !~ m/\./) && $tlpobj->docfiles) { my $doccontainer = $container; $doccontainer =~ s/(\.tar\.lzma|\.zip)$/.doc$1/; @@ -578,7 +585,7 @@ sub install_packages { if (!$opt_src) { $tlpobj->clear_srcfiles; } - if (!$opt_doc) { + if (!$real_opt_doc) { $tlpobj->clear_docfiles; } $totlpdb->add_tlpobj($tlpobj); -- cgit v1.2.3