texlive[61401] trunk: doc,sync

commits+karl at tug.org commits+karl at tug.org
Fri Dec 24 23:42:10 CET 2021


Revision: 61401
          http://tug.org/svn/texlive?view=revision&revision=61401
Author:   karl
Date:     2021-12-24 23:42:10 +0100 (Fri, 24 Dec 2021)
Log Message:
-----------
doc,sync

Modified Paths:
--------------
    trunk/Build/source/texk/tests/TeXLive/TLConfig.pm
    trunk/Build/source/texk/tests/TeXLive/TLUtils.pm
    trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
    trunk/Master/tlpkg/bin/c2lx
    trunk/Master/tlpkg/bin/tl-check-fmtshare

Modified: trunk/Build/source/texk/tests/TeXLive/TLConfig.pm
===================================================================
--- trunk/Build/source/texk/tests/TeXLive/TLConfig.pm	2021-12-24 22:17:31 UTC (rev 61400)
+++ trunk/Build/source/texk/tests/TeXLive/TLConfig.pm	2021-12-24 22:42:10 UTC (rev 61401)
@@ -1,12 +1,12 @@
-# $Id: TLConfig.pm 59225 2021-05-16 17:41:12Z karl $
 # TeXLive::TLConfig.pm - module exporting configuration values
 # Copyright 2007-2021 Norbert Preining
 # This file is licensed under the GNU General Public License version 2
 # or any later version.
 
+use strict; use warnings;
 package TeXLive::TLConfig;
 
-my $svnrev = '$Revision: 59225 $';
+my $svnrev = '$Revision: 61229 $';
 my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
 sub module_revision { return $_modulerevision; }
 
@@ -60,12 +60,12 @@
 
 # the year of our release, will be used in the location of the
 # network packages, and in menu names, and other places.
-$ReleaseYear = 2021;
+our $ReleaseYear = 2021;
 
 # users can upgrade from this year to the current year; might be the
 # same as the release year, or any number of releases earlier.
 # Generally not tested, but should be.
-$MinRelease = 2016;
+our $MinRelease = 2016;
 
 # Meta Categories do not ship files, but only call for other packages.
 our @MetaCategories = qw/Collection Scheme/;

Modified: trunk/Build/source/texk/tests/TeXLive/TLUtils.pm
===================================================================
--- trunk/Build/source/texk/tests/TeXLive/TLUtils.pm	2021-12-24 22:17:31 UTC (rev 61400)
+++ trunk/Build/source/texk/tests/TeXLive/TLUtils.pm	2021-12-24 22:42:10 UTC (rev 61401)
@@ -3,9 +3,11 @@
 # This file is licensed under the GNU General Public License version 2
 # or any later version.
 
+use strict; use warnings;
+
 package TeXLive::TLUtils;
 
-my $svnrev = '$Revision: 60823 $';
+my $svnrev = '$Revision: 61372 $';
 my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
 sub module_revision { return $_modulerevision; }
 
@@ -127,16 +129,24 @@
 
 # avoid -warnings.
 our $PERL_SINGLE_QUOTE; # we steal code from Text::ParseWords
-use vars qw(
-  $::LOGFILE $::LOGFILENAME @::LOGLINES 
-    @::debug_hook @::ddebug_hook @::dddebug_hook @::info_hook 
-    @::install_packages_hook @::warn_hook
-  $TeXLive::TLDownload::net_lib_avail
-    $::checksum_method $::gui_mode $::machinereadable $::no_execute_actions
-    $::regenerate_all_formats
-  $JSON::false $JSON::true
-);
 
+# We use myriad global and package-global variables, unfortunately.
+# To avoid "used only once" warnings, we must use the variable names
+# again; one way to do that would be to assign them all to themselves in
+# the BEGIN block, but this seems (slightly) less ugly.
+# Example in first reply to: https://perlmonks.org/?node_id=11139324
+# 
+# Because we are providing a block to the package command, the scope is
+# limited to that block, so the current real package ends up unaffected.
+package main {
+  our ($LOGFILE, $LOGFILENAME, @LOGLINES,
+    @debug_hook, @ddebug_hook, @dddebug_hook, @info_hook,
+    @install_packages_hook, @warn_hook,
+    $checksum_method, $gui_mode, $machinereadable,
+    $no_execute_actions, $regenerate_all_formats); }
+package JSON { our ($false, $true); }
+package TeXLive::TLDownload { our $net_lib_avail; }
+
 BEGIN {
   use Exporter ();
   use vars qw(@ISA @EXPORT_OK @EXPORT);
@@ -966,7 +976,7 @@
     # from the UNC path, since (! -d //servername/) tests true
     $subdir = $& if ( win32() && ($tree =~ s!^//[^/]+/!!) );
 
-    @dirs = split (/[\/\\]/, $tree);
+    my @dirs = split (/[\/\\]/, $tree);
     for my $dir (@dirs) {
       $subdir .= "$dir/";
       if (! -d $subdir) {
@@ -1278,11 +1288,11 @@
 
     chmod ($mode, $outfile) || warn "chmod($mode,$outfile) failed: $!";
 
-    while ($read = sysread (IN, $buffer, $blocksize)) {
+    while (my $read = sysread (IN, $buffer, $blocksize)) {
       die "read($infile) failed: $!" unless defined $read;
       $offset = 0;
       while ($read) {
-        $written = syswrite (OUT, $buffer, $read, $offset);
+        my $written = syswrite (OUT, $buffer, $read, $offset);
         die "write($outfile) failed: $!" unless defined $written;
         $read -= $written;
         $offset += $written;
@@ -1520,7 +1530,7 @@
     $min %= 60;
   }
   my $sec = $remsecs % 60;
-  $remtime = sprintf("%02d:%02d", $min, $sec);
+  my $remtime = sprintf("%02d:%02d", $min, $sec);
   if ($hour) {
     $remtime = sprintf("%02d:$remtime", $hour);
   }
@@ -1531,7 +1541,7 @@
     $tmin %= 60;
   }
   my $tsec = $esttotalsecs % 60;
-  $tottime = sprintf("%02d:%02d", $tmin, $tsec);
+  my $tottime = sprintf("%02d:%02d", $tmin, $tsec);
   if ($thour) {
     $tottime = sprintf("%02d:$tottime", $thour);
   }
@@ -2057,7 +2067,7 @@
   }
   if (-w $to) {
     debug ("TLUtils::add_link_dir_dir: linking from $from to $to\n");
-    chomp (@files = `ls "$from"`);
+    chomp (my @files = `ls "$from"`);
     my $ret = 1;
     for my $f (@files) {
       # don't make a system-dir link to our special "man" link.
@@ -2093,7 +2103,7 @@
   my ($from, $to) = @_;
   if ((-d "$to") && (-w "$to")) {
     debug("TLUtils::remove_link_dir_dir: removing links from $from to $to\n");
-    chomp (@files = `ls "$from"`);
+    chomp (my @files = `ls "$from"`);
     my $ret = 1;
     foreach my $f (@files) {
       next if (! -r "$to/$f");
@@ -2654,11 +2664,11 @@
 
   if ($::opt_verbosity >= 2) {
     require Data::Dumper;
-    use vars qw($Data::Dumper::Indent $Data::Dumper::Sortkeys
-                $Data::Dumper::Purity); # -w pain
-    $Data::Dumper::Indent = 1;
-    $Data::Dumper::Sortkeys = 1;  # stable output
-    $Data::Dumper::Purity = 1; # recursive structures must be safe
+    # avoid spurious "used only once" warnings due to require
+    # (warnings restored at end of scope). https://perlmonks.org/?node_id=3333
+    no warnings 'once';
+    local $Data::Dumper::Sortkeys = 1;  # stable output
+    local $Data::Dumper::Purity = 1;    # reconstruct recursive structures
     print STDERR "DD:dumping ";
     print STDERR Data::Dumper->Dump([\%::progs], [qw(::progs)]);
   }
@@ -3649,7 +3659,7 @@
 sub backtrace {
   my $ret = "";
 
-  my ($line, $subr);
+  my ($filename, $line, $subr);
   my $stackframe = 1;  # skip ourselves
   while ((undef,$filename,$line,$subr) = caller ($stackframe)) {
     # the undef is for the package, which is already included in $subr.
@@ -4275,6 +4285,7 @@
 
 sub download_to_temp_or_file {
   my $url = shift;
+  my $ret;
   my ($url_fh, $url_file);
   if ($url =~ m,^(https?|ftp|file)://, || $url =~ m!$SshURIRegex!) {
     ($url_fh, $url_file) = tl_tmpfile();
@@ -4643,7 +4654,7 @@
         foreach my $db (@texmfdbs) {
           $db=substr($db, -1) if ($db=~m|/$|); # strip leading /
           $db = lc($db) if win32();
-          $up = (win32() ? lc($path) : $path);
+          my $up = (win32() ? lc($path) : $path);
           if (substr($up, 0, length("$db/")) eq "$db/") {
             # we appended a / because otherwise "texmf" is recognized as a
             # substring of "texmf-dist".

Modified: trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2021-12-24 22:17:31 UTC (rev 61400)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2021-12-24 22:42:10 UTC (rev 61401)
@@ -9459,32 +9459,32 @@
 
 =over 4
 
-=item C<auto-remove>, value 0 or 1 (default 1), same as command-line
+=item C<auto-remove => 0 or 1 (default 1), same as command-line
 option.
 
-=item C<gui-expertmode>, value 0 or 1 (default 1).
+=item C<gui-expertmode => 0 or 1 (default 1).
 This switches between the full GUI and a simplified GUI with only the
 most common settings.
 
-=item C<gui-lang> I<llcode>, with a language code value as with the
+=item C<gui-lang => I<llcode>, with a language code value as with the
 command-line option.
 
-=item C<no-checksums>, value 0 or 1 (default 0, see below).
+=item C<no-checksums => 0 or 1 (default 0, see below).
 
-=item C<persistent-downloads>, value 0 or 1 (default 1), same as
+=item C<persistent-downloads => 0 or 1 (default 1), same as
 command-line option.
 
-=item C<require-verification>, value 0 or 1 (default 0), same as
+=item C<require-verification => 0 or 1 (default 0), same as
 command-line option.
 
-=item C<tkfontscale>, value any float.
-Controls the scaling of fonts in the Tk based frontends.
+=item C<tkfontscale => I<floating-point number> (default 1.0);
+scaling factor for fonts in the Tk-based frontends.
 
-=item C<update-exclude>, value: comma-separated list of packages
-(no space allowed). Same as the command line option C<--exclude>
-for the action C<update>.
+=item C<update-exclude => I<comma-separated list of packages>
+(no spaces allowed). Same as the command line option C<--exclude>
+for the C<update> action.
 
-=item C<verify-downloads>, value 0 or 1 (default 1), same as
+=item C<verify-downloads => 0 or 1 (default 1), same as
 command-line option.
 
 =back
@@ -9493,33 +9493,30 @@
 
 =over 4
 
-=item C<allowed-actions> I<action1> [,I<action>,...]
-The value is a comma-separated list of C<tlmgr> actions which are
-allowed to be executed when C<tlmgr> is invoked in system mode (that is,
-without C<--usermode>).
+=item C<allowed-actions => I<action1>[,I<action2>,...]
+The value is a comma-separated list (no spaces) of C<tlmgr> actions
+which are allowed to be executed when C<tlmgr> is invoked in system mode
+(that is, without C<--usermode>). This allows distributors to include
+C<tlmgr> in their packaging, but allow only a restricted set of actions
+that do not interfere with their distro package manager. For native TeX
+Live installations, it doesn't make sense to set this.
 
-This allows distributors to include the C<tlmgr> in their packaging, but
-allow only a restricted set of actions that do not interfere with their
-distro package manager.  For native TeX Live installations, it doesn't
-make sense to set this.
-
 =back
 
-The C<no-checksums> key needs more explanation.  By default, package
-checksums computed and stored on the server (in the TLPDB) are compared
-to checksums computed locally after downloading.  C<no-checksums>
-disables this process.
+Finally, the C<no-checksums> key needs more explanation. By default,
+package checksums computed and stored on the server (in the TLPDB) are
+compared to checksums computed locally after downloading.
+C<no-checksums> disables this process. The checksum algorithm is
+SHA-512. Your system must have one of (looked for in this order) the
+Perl C<Digest::SHA> module, the C<openssl> program
+(L<https://openssl.org>), the C<sha512sum> program (from GNU Coreutils,
+L<https://www.gnu.org/software/coreutils>), or finally the C<shasum>
+program (just to support old Macs). If none of these are available, a
+warning is issued and C<tlmgr> proceeds without checking checksums.
+C<no-checksums> avoids the warning. (Incidentally, other SHA
+implementations, such as the pure Perl and pure Lua modules, are much
+too slow to be usable in our context.)
 
-The checksum algorithm is SHA-512.  Your system must have one of (looked
-for in this order) the Perl C<Digest::SHA> module, the C<openssl>
-program (L<https://openssl.org>), the C<sha512sum> program (from GNU
-Coreutils, L<https://www.gnu.org/software/coreutils>), or finally the
-C<shasum> program (just to support old Macs).  If none of these are
-available, a warning is issued and C<tlmgr> proceeds without checking
-checksums.  (Incidentally, other SHA implementations, such as the pure
-Perl and pure Lua modules, are much too slow to be usable in our
-context.)  C<no-checksums> avoids the warning.
-
 =head1 CRYPTOGRAPHIC VERIFICATION
 
 C<tlmgr> and C<install-tl> perform cryptographic verification if
@@ -9653,7 +9650,6 @@
 
 In user mode, these actions operate only on the user tree's
 configuration files and/or C<texlive.tlpdb>.
-creates configuration files in user tree
 
 =head1 MULTIPLE REPOSITORIES
 

Modified: trunk/Master/tlpkg/bin/c2lx
===================================================================
--- trunk/Master/tlpkg/bin/c2lx	2021-12-24 22:17:31 UTC (rev 61400)
+++ trunk/Master/tlpkg/bin/c2lx	2021-12-24 22:42:10 UTC (rev 61401)
@@ -29,7 +29,8 @@
   pkgs="l3kernel l3packages l3experimental l3build l3backend"
 elif test "x$1" = xjxu; then
   shift; label=jxu
-  pkgs="beaulivre colorist einfart lebhart minimalist simplivre"
+  pkgs="beaulivre colorist einfart lebhart mindflow minimalist"
+  pkgs="$pkgs projlib simplivre"
 else
   echo "$0: unknown latex or group type: $1 (one of: e dev 3 jxu)" >&2
   exit 1

Modified: trunk/Master/tlpkg/bin/tl-check-fmtshare
===================================================================
--- trunk/Master/tlpkg/bin/tl-check-fmtshare	2021-12-24 22:17:31 UTC (rev 61400)
+++ trunk/Master/tlpkg/bin/tl-check-fmtshare	2021-12-24 22:42:10 UTC (rev 61401)
@@ -272,8 +272,9 @@
   echo "$0: running on $remotesys: $remotecmd" >$rfot
   ssh -n $remotesys "$remotecmd" </dev/null >>$rfot 2>&1
   if test $? -ne 0; then
-    echo "$0: fmt load failed on $remotesys: $fmt" >&2
-    echo "$0: see transcript: $rfot" >&2
+    echo "$0: *** fmt load failed on $remotesys: $fmt" >&2
+    echo "$0: *** see transcript: $rfot" >&2
+    cat $rfot >&2
     exit 1
   else
     echo "$0: fmt load ok on $remotesys: $fmt"



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