diff options
Diffstat (limited to 'Master/tlpkg/bin')
-rwxr-xr-x | Master/tlpkg/bin/tl-update-tlpdb | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/Master/tlpkg/bin/tl-update-tlpdb b/Master/tlpkg/bin/tl-update-tlpdb index 15e12c1f831..7904930df42 100755 --- a/Master/tlpkg/bin/tl-update-tlpdb +++ b/Master/tlpkg/bin/tl-update-tlpdb @@ -117,7 +117,10 @@ sub main # new $newtlpdb points to the right one if ($buggy_tlpdb) { tlwarn("$progname: the newly created tlpdb seems to be buggy.\n"); - if ($opt_save_anyway) { + if ($opt_output) { + tlwarn("$progname: saving it anyway due to --output given\n"); + $buggy_tlpdb = 0; + } elsif ($opt_save_anyway) { tlwarn("$progname: saving it anyway due to --save-anyway\n"); $buggy_tlpdb = 0; } else { @@ -223,6 +226,14 @@ sub create_tlpdb } my $tlpsrc_dir = "$opt_master/tlpkg/tlpsrc"; + if (@ARGV) { + # if we have cmd line arguments act as if --tlpsrc-from-cmdline was given + if (!$opt_tlpsrc_from_cmdline) { + tlwarn("$progname: additional arguments on cmd line,\n"); + tlwarn("$progname: acting as if --tlpsrc-from-cmdline was given.\n"); + $opt_tlpsrc_from_cmdline = 1; + } + } if (!$opt_tlpsrc_from_cmdline) { # if not otherwise given use all tlpsrc files @@ -242,6 +253,7 @@ sub create_tlpdb info ("$progname: updating from tlpsrc ...\n"); my $tldb = TeXLive::TLPDB->new; my $src_count = 0; + my $found_texlive_installation = 0; foreach my $f (@ARGV) { next if ($f =~ m/^00texlive\.autopatterns/); $src_count++; @@ -251,6 +263,7 @@ sub create_tlpdb my $tlp = $tlsrc->make_tlpobj ($tltree, $opt_master); (my $base_f = $f) =~ s/\.tlpsrc$//; + $base_f = TeXLive::TLUtils::basename($base_f); warn "$f: package name " . $tlp->name . " does not match filename\n" if $tlp->name ne $base_f; @@ -281,6 +294,9 @@ sub create_tlpdb $tlp->recompute_revision ($tltree, $tltree->file_svn_lastrevision("tlpkg/tlpsrc/$f")); } } + if ($tlp->name eq "00texlive.installation") { + $found_texlive_installation = 1; + } if ($tlp->name eq "00texlive.config") { my @bar = $tlp->depends; for my $k (sort keys %TeXLive::TLConfig::TLPDBConfigs) { @@ -293,12 +309,21 @@ sub create_tlpdb $tldb->add_tlpobj ($tlp); } $tldb->root ($opt_master); - # do set the option_archs from the dirs in Master/bin - my @archs = $tltree->architectures; - $tldb->setting("available_architectures", @archs); - # reset options to what we have by default - $tldb->add_default_options(); + # + # we set several options in 00texlive.installation only in two cases: + # 1) we are updating from *all* tlpsrc file, so no cmd line options + # 2) we are updating from cmd line tlpsrc file, but 00texlive.installation + # is contained in the list + + if (!$opt_tlpsrc_from_cmdline || $found_texlive_installation) { + # do set the option_archs from the dirs in Master/bin + my @archs = $tltree->architectures; + $tldb->setting("available_architectures", @archs); + + # reset options to what we have by default + $tldb->add_default_options(); + } return($tldb, $src_count); } |