From a2ab612198d3b8adcf19a9deb382dfe503c09e0d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 27 Oct 2017 04:42:58 +0000 Subject: adjust tl-update-tlpdb to new location of frozen, update release docs git-svn-id: svn://tug.org/texlive/trunk@45618 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/tl-update-tlpdb | 43 ++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'Master/tlpkg/bin/tl-update-tlpdb') diff --git a/Master/tlpkg/bin/tl-update-tlpdb b/Master/tlpkg/bin/tl-update-tlpdb index f8d95726b5e..6948f15be6f 100755 --- a/Master/tlpkg/bin/tl-update-tlpdb +++ b/Master/tlpkg/bin/tl-update-tlpdb @@ -40,7 +40,6 @@ my $opt_output; my $opt_save_anyway = 0; my $opt_tlpsrc_from_cmdline = 0; my $opt_w32warning; -my $opt_tlpdb_options_from_tlpsrc = 0; my $opt_keep_revisions = 0; TeXLive::TLUtils::process_logging_options(); @@ -60,7 +59,6 @@ GetOptions( "save-anyway!" => \$opt_save_anyway, "tlpsrc-from-cmdline" => \$opt_tlpsrc_from_cmdline, "with-w32-pattern-warning" => \$opt_w32warning, - "tlpdb-options-from-tlpsrc" => \$opt_tlpdb_options_from_tlpsrc, "help|?" => \$help) or pod2usage(1); pod2usage(-exitstatus => 0, -verbose => 2) if $help; @@ -391,18 +389,32 @@ sub create_tlpdb { $found_texlive_installation = 1; } if ($tlp->name eq "00texlive.config") { - # in original TL we set the options in TLConfig, but local repositories - # might want to set them in the .tlpsrc file, so give them the option - # to do so - if (!$opt_tlpdb_options_from_tlpsrc) { - my @bar = $tlp->depends; - for my $k (sort keys %TeXLive::TLConfig::TLPDBConfigs) { - push @bar, "$k/" . $TeXLive::TLConfig::TLPDBConfigs{$k}; + # defaults for these options are from %TeXLive::TLConfig::TLPDBConfigs + # but can be overriden by putting them into this source package + my %cfgs; + # first read the default settings + for my $k (keys %TeXLive::TLConfig::TLPDBConfigs) { + $cfgs{$k} = $TeXLive::TLConfig::TLPDBConfigs{$k}; + } + # next parse the ones set in the tlpsrc + for my $dep ($tlp->depends) { + my ($k,$v) = split('/',$dep,2); + if (defined($k)) { + if (defined($cfgs{$k})) { + # override setting + $cfgs{$k} = $v; + } else { + die("Unknown key in 00texlive.config.tlpsrc: $dep"); + } } - # add the latest revision - push @bar, "revision/".$tltree->revision; - $tlp->depends (@bar); } + my @bar; + for my $k (sort keys %cfgs) { + push @bar, "$k/" . $cfgs{$k}; + } + # add the latest revision + push @bar, "revision/".$tltree->revision; + $tlp->depends (@bar); } $tldb->add_tlpobj ($tlp); } @@ -518,13 +530,6 @@ anyway. It can be useful in combination with the C<--from-files> option where the revision numbers will be adjusted afterwards by an external program. -=item B<--tlpdb-options-from-tlpsrc> - -By default, the tlpdb specific settings in C<00texlive.config> are taken -from the C<%TeXLive::TLConfig::TLPDBConfigs>. Alternative repositories -might set these values directly in the tlpsrc file; using this option -omits adding anything to the configs set in the tlpsrc file. - =item B<--tlpsrc-from-cmdline> By default, C recreates the tlpdb from all the tlpsrc -- cgit v1.2.3