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

commits+karl at tug.org commits+karl at tug.org
Sat Jan 13 23:43:25 CET 2024


Revision: 69413
          https://tug.org/svn/texlive?view=revision&revision=69413
Author:   karl
Date:     2024-01-13 23:43:25 +0100 (Sat, 13 Jan 2024)
Log Message:
-----------
(setup_one_remotetlpdb): wording of stale remote db.

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	2024-01-13 22:31:58 UTC (rev 69412)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2024-01-13 22:43:25 UTC (rev 69413)
@@ -1,6 +1,6 @@
 #!/usr/bin/env perl
 # $Id$
-# Copyright 2008-2023 Norbert Preining
+# Copyright 2008-2024 Norbert Preining
 # This file is licensed under the GNU General Public License version 2
 # or any later version.
 # 
@@ -7344,11 +7344,15 @@
     }
   }
 
-  # check for remote main db being *older* than what we have seen before
+  # Check for remote main db being *older* than what we have seen
+  # before, to avoid wrongly removing packages because a stale mirror
+  # happens to be chosen.
+  # 
   # The check we employ is heuristic: texlive-scripts is updated practically
-  # every day. We compare the locally installed texlive-scripts with the
-  # remove revision, and if that does not line up, we error out.
-  # Note that we only do this check if the remote database contains texlive-scripts
+  # every day. We compare the locally-installed texlive-scripts with the
+  # remote revision, and if that does not line up, we error out.
+  # 
+  # We only do this check if the remote database contains texlive-scripts
   # otherwise sub-repos (like tlgpg) will fail.
   # Alternative approaches:
   # - loop over all installed packages and take the maximum of revisions found
@@ -7362,8 +7366,8 @@
     my $remote_revision;
     if (!defined($rtlp)) {
       # remote db does not contain texlive-scripts, so we skip all checks
-      debug("Remote database does not contain texlive-scripts, "
-            . "not doing version checks\n");
+      debug("Remote database does not contain the texlive-scripts package, "
+            . "skipping version consistency check\n");
       $remote_revision = 0;
     } else {
       $remote_revision = $rtlp->revision;
@@ -7370,7 +7374,7 @@
     }
     if (!defined($ltlp)) {
       info("texlive-scripts package not found (?!), "
-           . "skipping revision consistency check\n");
+           . "skipping version consistency check\n");
       $local_revision = 0;
     } else {
       $local_revision = $ltlp->revision;
@@ -7379,16 +7383,17 @@
           . "texlive-scripts local revision $local_revision\n");
     if ($remote_revision > 0 && $local_revision > $remote_revision) {
       info("fail load $location\n") if ($::machinereadable);
-      return(undef, "Remote database (rev $remote_revision of texlive-scripts) "
-                    . "seems to be older than local (rev $local_revision of "
-                    . "texlive-scripts); please use different mirror or "
-                    . "wait a day or so.")
+      return(undef, <<OLD_REMOTE_MSG);
+Remote database (revision $remote_revision of the texlive-scripts package)
+seems to be older than the local installation (rev $local_revision of
+texlive-scripts); please use a different mirror and/or wait a day or two.
+OLD_REMOTE_MSG
     }
   }
 
   # check for being frozen
   if ($remotetlpdb->config_frozen) {
-    my $frozen_msg = <<FROZEN;
+    my $frozen_msg = <<FROZEN_MSG;
 TeX Live $TeXLive::TLConfig::ReleaseYear is frozen
 and will no longer be routinely updated.  This happens when a new
 release is made, or will be made shortly.
@@ -7396,7 +7401,7 @@
 For general status information about TeX Live, see its home page:
 https://tug.org/texlive
 
-FROZEN
+FROZEN_MSG
     # don't die here, we want to allow updates even if tlnet is frozen!
     tlwarn($frozen_msg);
   }



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