texlive[58848] Master/texmf-dist/scripts/texlive/tlmgr.pl: tlmgr

commits+preining at tug.org commits+preining at tug.org
Mon Apr 12 03:00:29 CEST 2021


Revision: 58848
          http://tug.org/svn/texlive?view=revision&revision=58848
Author:   preining
Date:     2021-04-12 03:00:29 +0200 (Mon, 12 Apr 2021)
Log Message:
-----------
tlmgr format rebuild semantics update

if create_formats option is unset, we do not build any new formats
but we do recreate existing formats. This uses the new feature of
fmtutil that allows pairing of --refresh with other format selection
commands like --byfmt etc.

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl

Modified: trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2021-04-12 01:00:22 UTC (rev 58847)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2021-04-12 01:00:29 UTC (rev 58848)
@@ -869,6 +869,13 @@
   my $sysmode = ($opts{"usermode"} ? "-user" : "-sys");
   my $invoke_fmtutil = "fmtutil$sysmode $common_fmtutil_args";
 
+  # of create_formats is unset (NOT the default) we add --refresh so that
+  # only existing formats are recreated
+  if (!$localtlpdb->option("create_formats")) {
+    $invoke_fmtutil .= " --refresh";
+    info("only existing formats will be refreshed per user option (create_formats=0)\n");
+  }
+
   if ($::files_changed) {
     $errors += do_cmd_and_check("mktexlsr");
     if (defined($localtlpdb->get_package('context'))
@@ -931,9 +938,8 @@
       }
     }
 
-    # format-regenerate is used when the paper size changes.  In that
-    # case, if option("create_formats") is set, we simply want to generate
-    # all formats
+    # format-regenerate is used when the paper size changes.
+    # In that case we simply want to generate all formats
     #
     my %done_formats;
     my %updated_engines;
@@ -957,16 +963,12 @@
     for my $m (keys %{$::execute_actions{'disable'}{'formats'}}) {
       $do_full = 1;
     }
-    my $opt_fmt = $localtlpdb->option("create_formats");
     if ($do_full) {
       info("regenerating fmtutil.cnf in $TEXMFDIST\n");
       TeXLive::TLUtils::create_fmtutil($localtlpdb,
                                        "$TEXMFDIST/web2c/fmtutil.cnf");
     }
-    if (!$opt_fmt) {
-      info("formats not rebuilt per user option (create_formats=0)\n");
-    }
-    if ($opt_fmt && !$::regenerate_all_formats) {
+    if (!$::regenerate_all_formats) {
       # first regenerate all formats --byengine 
       for my $e (keys %updated_engines) {
         debug ("updating formats based on $e\n");
@@ -997,13 +999,13 @@
           # Use full path for external command, except on Windows.
           $lang = "$TEXMFSYSVAR/tex/generic/config/$lang";
         }
-        if ($opt_fmt && !$::regenerate_all_formats) {
+        if (!$::regenerate_all_formats) {
           $errors += do_cmd_and_check ("$invoke_fmtutil --byhyphen \"$lang\"");
         }
       }
     }
 
-    if ($opt_fmt && $::regenerate_all_formats) {
+    if ($::regenerate_all_formats) {
       info("Regenerating all formats, this may take some time ...");
       $errors += do_cmd_and_check("$invoke_fmtutil --all");
       info("done\n");



More information about the tex-live-commits mailing list.