Skip to content

Commit

Permalink
updating installer data
Browse files Browse the repository at this point in the history
  • Loading branch information
norbusan committed Jan 13, 2024
1 parent f0fda16 commit 54ea720
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions texmf-dist/scripts/texlive/tlmgr.pl
Original file line number Diff line number Diff line change
@@ -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.
#
Expand Down Expand Up @@ -7344,11 +7344,15 @@ sub setup_one_remotetlpdb {
}
}

# 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
Expand All @@ -7362,15 +7366,15 @@ sub setup_one_remotetlpdb {
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;
}
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;
Expand All @@ -7379,24 +7383,25 @@ sub setup_one_remotetlpdb {
. "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.
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);
}
Expand Down

0 comments on commit 54ea720

Please sign in to comment.