Skip to content

Commit

Permalink
texlogsieve (15jan24)
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@69436 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
kberry committed Jan 15, 2024
1 parent 6355448 commit fb21f09
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 28 deletions.
58 changes: 37 additions & 21 deletions texk/texlive/linked_scripts/texlive/tlmgr.pl
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/usr/bin/env perl
# $Id: tlmgr.pl 69327 2024-01-07 11:10:51Z preining $
# Copyright 2008-2023 Norbert Preining
# $Id: tlmgr.pl 69413 2024-01-13 22:43:25Z karl $
# Copyright 2008-2024 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
# TeX Live Manager.

use strict; use warnings;

my $svnrev = '$Revision: 69327 $';
my $datrev = '$Date: 2024-01-07 12:10:51 +0100 (Sun, 07 Jan 2024) $';
my $svnrev = '$Revision: 69413 $';
my $datrev = '$Date: 2024-01-13 23:43:25 +0100 (Sat, 13 Jan 2024) $';
my $tlmgrrevision;
my $tlmgrversion;
my $prg;
Expand Down Expand Up @@ -7344,48 +7344,64 @@ 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.
# 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
# - on every update, save the last seen remote main revision into
# 00texlive.installation
#
if ($is_main) {
my $remote_revision = $remotetlpdb->config_revision;
my $tlp = $localtlpdb->get_package("texlive-scripts");
my $rtlp = $remotetlpdb->get_package("texlive-scripts");
my $ltlp = $localtlpdb->get_package("texlive-scripts");
my $local_revision;
if (!defined($tlp)) {
my $remote_revision;
if (!defined($rtlp)) {
# remote db does not contain texlive-scripts, so we skip all checks
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 = $tlp->revision;
$local_revision = $ltlp->revision;
}
debug("Remote database revision $remote_revision, "
debug("texlive-scripts remote revision $remote_revision, "
. "texlive-scripts local revision $local_revision\n");
if ($local_revision > $remote_revision) {
if ($remote_revision > 0 && $local_revision > $remote_revision) {
info("fail load $location\n") if ($::machinereadable);
return(undef, "Remote database (rev $remote_revision) 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 Expand Up @@ -10281,7 +10297,7 @@ =head1 AUTHORS AND COPYRIGHT
distribution (L<https://tug.org/texlive>) and both are licensed under the
GNU General Public License Version 2 or later.
$Id: tlmgr.pl 69327 2024-01-07 11:10:51Z preining $
$Id: tlmgr.pl 69413 2024-01-13 22:43:25Z karl $
=cut
# test HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html
Expand Down
38 changes: 31 additions & 7 deletions texk/texlive/linked_scripts/texlogsieve/texlogsieve
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

-- texlogsieve - filter and summarize LaTeX log files
--
-- Copyright (C) 2021-2023 Nelson Lago <[email protected]>
-- Copyright (C) 2021-2024 Nelson Lago <[email protected]>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -974,8 +974,8 @@ Options:
--version print program version]]

versionmsg = [[
texlogsieve 1.4.0
Copyright (C) 2021-2023 Nelson Lago <[email protected]>
texlogsieve 1.4.1
Copyright (C) 2021-2024 Nelson Lago <[email protected]>
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.]]
Expand Down Expand Up @@ -1527,6 +1527,10 @@ function adjustSeverity(msg)
"Unknown feature `' in font %b`'", -- empty feature, not a problem
"Package refcheck Warning: Unused label %b`'", -- we process these specially
"Token not allowed in a PDF string %(Unicode%):",
"Font shape `[^']*/m/[^']*' in size %b<> not available.*"
.. "Font shape `[^']*/regular/[^']*' tried instead",
"Font shape `[^']*/b/[^']*' in size %b<> not available.*"
.. "Font shape `[^']*/bold/[^']*' tried instead",
}

DEFAULT_FORCED_WARNING = {}
Expand Down Expand Up @@ -2633,7 +2637,7 @@ end

-- The pattern we want to check may stretch over several lines. This
-- function recursively checks each line of the pattern against the
-- corresponding input line, but only up to three lines, as that is
-- corresponding input line, but only up to five lines, as that is
-- enough to make sure the pattern really matches.
function stringsHandler:canDoitRecursive(patternLines,
position, offset, depth)
Expand All @@ -2655,7 +2659,7 @@ function stringsHandler:canDoitRecursive(patternLines,
-- see comment below about "nextline, patternLine"
if first ~= nil and not string.find(nextline, patternLine) then
-- Found it!
if depth > 2 -- 3 lines matched, that is enough
if depth > 4 -- 5 lines matched, that is enough
or #patternLines == 1 -- no more pattern lines
or Lines:get(position +1) == nil -- no more input lines

Expand Down Expand Up @@ -2972,6 +2976,7 @@ anywhereDebugStringsHandler.patterns = {
beginningOfLineInfoStringsHandler = stringsHandler:new()
beginningOfLineInfoStringsHandler.severity = INFO
beginningOfLineInfoStringsHandler.patterns = {
"^%s*system commands enabled%.",
"^Writing index file.*%.idx",
"^Writing glossary file.*%.glo",
"^%*geometry%* driver:.*",
Expand All @@ -2988,6 +2993,8 @@ beginningOfLineInfoStringsHandler.patterns = {
"^No file .-%.bbl%.",
"^No file .-%.gls%.",

"^runsystem%b()%.%.%.executed",

'luaotfload | db : Reload initiated %(formats: .-%); reason: Font ".-" not found%.',

"^reledmac reminder:%s*\n"
Expand All @@ -2999,9 +3006,26 @@ beginningOfLineInfoStringsHandler.patterns = {

"^ ?LaTeX document class for Lecture Notes in Computer Science",

"^%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*\n"
-- Remember that order matters here!
"^" .. string.rep("%*", 37) .. "%*?%*?\n"
.. "%* Local config file " .. filepat .. " used\n"
.. string.rep("%*", 37) .. "%*?%*?\n",

"^" .. string.rep("%*", 38) .. "\n"
.. "%*\n"
.. "%* Local config file " .. filepat .. " used\n"
.. "%*",
.. "%*\n"
.. string.rep("%*", 38) .. "\n",

"^" .. string.rep("%*", 37) .. "%*?%*?\n"
.. "%* Local config file " .. filepat .. " used\n"
.. "%*\n",

"^" .. string.rep("%=", 36) .. "\n"
.. "%s*Local config file " .. filepat .. " used\n"
.. string.rep("%=", 36) .. "%=?\n",

"^Local config file " .. filepat .. " used\n",

"^=== Package selnolig, Version %S+, Date " .. datepat .. " ===",

Expand Down

0 comments on commit fb21f09

Please sign in to comment.