diff options
-rwxr-xr-x | Master/install-tl | 9 | ||||
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 2 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 34 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tl-update-containers | 22 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpdb2container | 4 | ||||
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 20 | ||||
-rwxr-xr-x | Master/tlpkg/installer/install-menu-text.pl | 16 |
7 files changed, 75 insertions, 32 deletions
diff --git a/Master/install-tl b/Master/install-tl index 760bb2b7d39..4b6557a854d 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -124,6 +124,8 @@ our %vars=( # 'n_' means 'number of'. 'sys_bin' => '/usr/local/bin', 'sys_man' => '/usr/local/man', 'sys_info' => '/usr/local/info', + 'src_splitting_supported' => 1, + 'doc_splitting_supported' => 1, 'option_doc' => 1, 'option_src' => 1, 'option_fmt' => 0, @@ -308,6 +310,13 @@ tllog($::LOG_NORMAL, "Installer Directory: '$::installerdir'\n"); initialize_installer(); setup_programs("$::installerdir/tlpkg/installer", "$::_platform_"); load_tlpdb(); + +# correctly set the splitting support +# for DVD we always support splitting +if ((media() eq "NET") || (media() eq "CD")) { + $vars{'src_splitting_supported'} = $tlpdb->config_src_container; + $vars{'doc_splitting_supported'} = $tlpdb->config_doc_container; +} $texlive_release = $tlpdb->config_release; set_platforms_supported(); set_texlive_default_dirs(); diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 2dbc1e2f285..116eb84107f 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -562,7 +562,7 @@ sub action_default { print "Create formats on installation: ", $localtlpdb->option_formats, "\n"; } } elsif ($what =~ m/^show$/i) { - print "Default installation location: ", $localtlpdb->option_location, "\n"; + print "Default installation source: ", $localtlpdb->option_location, "\n"; print "Create formats on installation: ", ($localtlpdb->option_formats ? "yes": "no"), "\n"; print "Install documentation files: ", ($localtlpdb->option_docfiles ? "yes": "no"), "\n"; print "Install source files: ", ($localtlpdb->option_srcfiles ? "yes": "no"), "\n"; diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 3b35a617412..ddc588aab6e 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -46,6 +46,16 @@ sub new { +sub copy { + my $self = shift; + my $bla = {}; + %$bla = %$self; + bless $bla, "TeXLive::TLPOBJ"; + return $bla; +} + + + sub from_file { my $self = shift; if (@_ != 1) { @@ -695,7 +705,7 @@ sub is_meta_package { return 0; } -sub split_doc_package { +sub docfiles_package { my $self = shift; if (not($self->docfiles)) { return ; } my $tlp = new TeXLive::TLPOBJ; @@ -705,12 +715,12 @@ sub split_doc_package { $tlp->category($self->category); $tlp->add_docfiles($self->docfiles); $tlp->docsize($self->docsize); - $self->clear_docfiles(); - $self->docsize(0); + # $self->clear_docfiles(); + # $self->docsize(0); return($tlp); } -sub split_src_package { +sub srcfiles_package { my $self = shift; if (not($self->srcfiles)) { return ; } my $tlp = new TeXLive::TLPOBJ; @@ -720,8 +730,8 @@ sub split_src_package { $tlp->category($self->category); $tlp->add_srcfiles($self->srcfiles); $tlp->srcsize($self->srcsize); - $self->clear_srcfiles(); - $self->srcsize(0); + # $self->clear_srcfiles(); + # $self->srcsize(0); return($tlp); } @@ -1195,11 +1205,15 @@ The original package is changed in two respects: the binfiles are removed (since they are now in the single name.arch packages), and an additional depend on "name.ARCH" is added. Note that the ARCH is a placeholder. -=item C<split_src_package> +=item C<srcfiles_package> + +=item C<docfiles_package> -splits off the srcfiles of C<TLPOBJ> into new independent C<TLPOBJ> with -the original name plus ".sources". The source files are removed from the -original package. +splits off the srcfiles or docfiles of C<TLPOBJ> into new independent +C<TLPOBJ> with +the original name plus ".sources". The source/doc files are +B<not> removed from the original package, since these functions are only +used for the creation of split containers. =item C<is_arch_dependent> diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers index c051e58feec..8d4e9a34cfd 100755 --- a/Master/tlpkg/bin/tl-update-containers +++ b/Master/tlpkg/bin/tl-update-containers @@ -129,22 +129,27 @@ sub main my $obj = $tlpdb->get_package ($pkg); die "$0: no TL package named $pkg in $Master" if ! $obj; tllog($::LOG_DEBUG, "updating $pkg containers ...\n"); + # we have to make a copy otherwise the src/doc files in the original + # tlpobj are removed, and thus also in the tlpdb to be saved!!! + my $objcopy = $obj->copy; if ($srcsplit) { - my $objsrc = $obj->split_src_package; + my $objsrc = $obj->srcfiles_package; + $objcopy->clear_srcfiles; if ($objsrc) { $objsrc->make_container($type, $Master, $opt_containerdir, "$pkg.source", $opt_relative); } } if ($docsplit) { - my $objdoc = $obj->split_doc_package; + my $objdoc = $obj->docfiles_package; + $objcopy->clear_docfiles; if ($objdoc) { $objdoc->make_container($type, $Master, $opt_containerdir, "$pkg.doc", $opt_relative); } } - $obj->make_container($type, $Master, $opt_containerdir, - $pkg, $opt_relative); + $objcopy->make_container($type, $Master, $opt_containerdir, + $pkg, $opt_relative); } if (@todopacks) { @@ -152,12 +157,15 @@ sub main print "$0: $count{new} new, $count{removed} removed, " . "$count{updated} updated, $count{unchanged} unchanged.\n"; # Finally we copy the source tlpdb over to the destination tlpdb - $tlpdb->root($opt_location); - $tlpdb->save; } else { print "$0: nothing to be done.\n"; } - + # STRANGE: It seems that calling -recreate did somehow not safe the + # docfiles into the texlive.tlpdb, no idea why. So update should now + # do that + $tlpdb->root($opt_location); + $tlpdb->save; + system("lzma -k -z $opt_location/tlpkg/texlive.tlpdb"); } diff --git a/Master/tlpkg/bin/tlpdb2container b/Master/tlpkg/bin/tlpdb2container index a612b8bfe6b..55662a3a36b 100755 --- a/Master/tlpkg/bin/tlpdb2container +++ b/Master/tlpkg/bin/tlpdb2container @@ -86,14 +86,14 @@ sub main my $obj = $tlpdb->get_package ($pkg); die "$0: no TeX Live package named $pkg in $Master.\n" if ! $obj; if ($srcsplit) { - my $objsrc = $obj->split_src_package; + my $objsrc = $obj->srcfiles_package; if ($objsrc) { $objsrc->make_container($type,$Master,$opt_outputdir,"$pkg.source",$opt_relative); $src_count++; } } if ($docsplit) { - my $objdoc = $obj->split_doc_package; + my $objdoc = $obj->docfiles_package; if ($objdoc) { $objdoc->make_container($type,$Master,$opt_outputdir,"$pkg.doc",$opt_relative); $src_count++; diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index dfc7ad12ca5..835dd455b36 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -305,15 +305,19 @@ sub run_menu { $ffmt->Label(-width => $b, -anchor => 'w', -textvariable => \$fmtyesno)->pack(-side => 'left'); $ffmt->Button(-width => $c, -text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_fmt'}, \$fmtyesno); })->pack(-side => 'left'); - my $fdoc = $fr->Frame; $fdoc->pack; - $fdoc->Label(-text => $labels{'optdoc'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); - $fdoc->Label(-width => $b, -anchor => 'w', -textvariable => \$docyesno)->pack(-side => 'left'); - $fdoc->Button(-width => $c, -text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_doc'}, \$docyesno); })->pack(-side => 'left'); + if ($vars{'doc_splitting_supported'}) { + my $fdoc = $fr->Frame; $fdoc->pack; + $fdoc->Label(-text => $labels{'optdoc'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); + $fdoc->Label(-width => $b, -anchor => 'w', -textvariable => \$docyesno)->pack(-side => 'left'); + $fdoc->Button(-width => $c, -text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_doc'}, \$docyesno); })->pack(-side => 'left'); + } - my $fsrc = $fr->Frame; $fsrc->pack; - $fsrc->Label(-text => $labels{'optsrc'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); - $fsrc->Label(-width => $b, -anchor => 'w', -textvariable => \$srcyesno)->pack(-side => 'left'); - $fsrc->Button(-width => $c, -text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_src'}, \$srcyesno); })->pack(-side => 'left'); + if ($vars{'src_splitting_supported'}) { + my $fsrc = $fr->Frame; $fsrc->pack; + $fsrc->Label(-text => $labels{'optsrc'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); + $fsrc->Label(-width => $b, -anchor => 'w', -textvariable => \$srcyesno)->pack(-side => 'left'); + $fsrc->Button(-width => $c, -text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_src'}, \$srcyesno); })->pack(-side => 'left'); + } if (unix()) { # Symlinks diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index cf68c36d430..47964a37b4c 100755 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -627,10 +627,14 @@ sub options_menu { print <<"EOF"; <P> use letter size instead of A4 by default: $b_letter <F> create all format files: $b_fmt - <D> install font/macro doc tree: $b_doc - <S> install font/macro source tree: $b_src EOF ; + if ($vars{'doc_splitting_supported'}) { + print " <D> install font/macro doc tree: $b_doc\n"; + } + if ($vars{'src_splitting_supported'}) { + print " <S> install font/macro source tree: $b_src\n"; + } if (unix) { print <<"EOF"; <L> create symlinks in standard directories: $b_symlinks @@ -794,10 +798,14 @@ EOF print <<"EOF"; $b_letter use letter size instead of A4 by default $b_fmt create all format files - $b_doc install macro/font doc tree - $b_src install macro/font source tree EOF ; + if ($vars{'doc_splitting_supported'}) { + print " $b_doc install macro/font doc tree\n"; + } + if ($vars{'src_splitting_supported'}) { + print " $b_src install macro/font source tree\n"; + } print <<"EOF" if (unix); $b_symlinks create symlinks in standard directories EOF |