summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-03-22 03:01:52 +0000
committerNorbert Preining <norbert@preining.info>2023-03-22 03:01:52 +0000
commitcbbc6dbdbf08b70a7e7d8d184ca51c57c835415a (patch)
tree97ded8ca7095c54f6ff9b661be6b93f80bf792c4 /systems/texlive/tlnet/tlpkg/TeXLive
parentde9a0afa47c2ee09e1d4704821cad2b231d36b3f (diff)
CTAN sync 202303220301
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/TeXLive')
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLConfig.pm22
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLCrypto.pm12
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm26
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm16
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm44
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLTREE.pm8
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm156
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLWinGoo.pm14
8 files changed, 164 insertions, 134 deletions
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLConfig.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLConfig.pm
index 5aa4bb0a70..2ce622b71a 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLConfig.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLConfig.pm
@@ -1,4 +1,4 @@
-# $Id: TLConfig.pm 66542 2023-03-11 17:59:45Z karl $
+# $Id: TLConfig.pm 66204 2023-02-26 22:10:41Z karl $
# TeXLive::TLConfig.pm - module exporting configuration values
# Copyright 2007-2023 Norbert Preining
# This file is licensed under the GNU General Public License version 2
@@ -7,7 +7,7 @@
use strict; use warnings;
package TeXLive::TLConfig;
-my $svnrev = '$Revision: 66542 $';
+my $svnrev = '$Revision: 66204 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -62,7 +62,7 @@ BEGIN {
# the year of our release, will be used in the location of the
# network packages, and in menu names, and other places.
-our $ReleaseYear = 2022;
+our $ReleaseYear = 2023;
# users can upgrade from this year to the current year; might be the
# same as the release year, or any number of releases earlier.
@@ -119,8 +119,8 @@ our $RelocPrefix = "RELOC";
our @CriticalPackagesList = qw/texlive.infra/;
our $CriticalPackagesRegexp = '^(texlive\.infra)';
if ($^O =~ /^MSWin/i) {
- push (@CriticalPackagesList, "tlperl.win32");
- $CriticalPackagesRegexp = '^(texlive\.infra|tlperl\.win32$)';
+ push (@CriticalPackagesList, "tlperl.windows");
+ $CriticalPackagesRegexp = '^(texlive\.infra|tlperl\.windows$)';
}
@@ -182,7 +182,7 @@ our %TLPDBConfigs = (
"container_format" => $DefaultCompressorFormat,
"minrelease" => $MinRelease,
"release" => $ReleaseYear,
- "frozen" => 1,
+ "frozen" => 0,
);
# definition of the option strings and their value types
@@ -214,10 +214,10 @@ our %TLPDBOptions = (
"Generate formats at installation or update" ],
"desktop_integration" =>
[ "b", 1, "desktop_integration",
- "Create Start menu shortcuts (w32)" ],
+ "Create Start menu shortcuts (Windows)" ],
"file_assocs" =>
[ "n:0..2", 1, "fileassocs",
- "Change file associations (w32)" ],
+ "Change file associations (Windows)" ],
"generate_updmap" =>
[ "b", 0, "generate_updmap",
"Run tlmgr generate updmap after maps have changed" ],
@@ -244,7 +244,7 @@ our %TLPDBOptions = (
"Destination for symlinks for man pages" ],
"w32_multi_user" =>
[ "b", 1, "multiuser",
- "Install for all users (w32)" ],
+ "Install for all users (Windows)" ],
);
@@ -257,7 +257,7 @@ our %TLPDBSettings = (
our $WindowsMainMenuName = "TeX Live $ReleaseYear";
# Comma-separated list of engines which do not exist on all platforms.
-our $PartialEngineSupport = "luajithbtex,luajittex,mfluajit";
+our $PartialEngineSupport = "luametatex,luajithbtex,luajittex,mfluajit";
# Flags for error handling across the scripts and modules
# all fine
@@ -367,7 +367,7 @@ C<systems/texlive/tlnet/>.
=item C<@TeXLive::TLConfig::CriticalPackagesRegexp>
A list of all those packages which we do not update regularly since they
-are too central, currently texlive.infra and (for Windows) tlperl.win32.
+are too central, currently texlive.infra and (for Windows) tlperl.windows.
=item C<@TeXLive::TLConfig::InstallExtraRequiredPackages>
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLCrypto.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLCrypto.pm
index 7a1829f8c1..b8bd48cd37 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLCrypto.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLCrypto.pm
@@ -1,6 +1,6 @@
-# $Id: TLCrypto.pm 59224 2021-05-16 16:50:31Z karl $
+# $Id: TLCrypto.pm 65994 2023-02-20 23:40:00Z karl $
# TeXLive::TLCrypto.pm - handle checksums and signatures.
-# Copyright 2016-2021 Norbert Preining
+# Copyright 2016-2023 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
@@ -9,10 +9,10 @@ package TeXLive::TLCrypto;
use Digest::MD5;
use TeXLive::TLConfig;
-use TeXLive::TLUtils qw(debug ddebug win32 which platform
+use TeXLive::TLUtils qw(debug ddebug wndws which platform
conv_to_w32_path tlwarn tldie);
-my $svnrev = '$Revision: 59224 $';
+my $svnrev = '$Revision: 65994 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -421,7 +421,7 @@ sub setup_gpg {
# Set up the gpg invocation:
my $gpghome = ($ENV{'TL_GNUPGHOME'} ? $ENV{'TL_GNUPGHOME'} :
"$master/tlpkg/gpg" );
- $gpghome =~ s!/!\\!g if win32();
+ $gpghome =~ s!/!\\!g if wndws();
my $gpghome_quote = "\"$gpghome\"";
# mind the final space for following args
$::gpg = "$prg --homedir $gpghome_quote ";
@@ -568,7 +568,7 @@ Internal routine running gpg to verify signature C<$sig> of C<$file>.
sub gpg_verify_signature {
my ($file, $sig) = @_;
my ($file_quote, $sig_quote);
- if (win32()) {
+ if (wndws()) {
$file =~ s!/!\\!g;
$sig =~ s!/!\\!g;
}
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm
index ac9264db1c..3bac015450 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm
@@ -1,13 +1,13 @@
-# $Id: TLPDB.pm 63068 2022-04-18 05:58:07Z preining $
+# $Id: TLPDB.pm 65964 2023-02-20 17:13:02Z karl $
# TeXLive::TLPDB.pm - tlpdb plain text database files.
-# Copyright 2007-2021 Norbert Preining
+# Copyright 2007-2023 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
use strict; use warnings;
package TeXLive::TLPDB;
-my $svnrev = '$Revision: 63068 $';
+my $svnrev = '$Revision: 65964 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -98,7 +98,7 @@ use TeXLive::TLConfig qw($CategoriesRegexp $DefaultCategory $InfraLocation
$RelocPrefix $RelocTree);
use TeXLive::TLCrypto;
use TeXLive::TLPOBJ;
-use TeXLive::TLUtils qw(dirname mkdirhier member win32 info log debug ddebug
+use TeXLive::TLUtils qw(dirname mkdirhier member wndws info log debug ddebug
tlwarn basename download_file merge_into tldie
system_pipe);
use TeXLive::TLWinGoo;
@@ -875,10 +875,10 @@ sub expand_dependencies {
$install{"$foo.$a"} = $install{$foo}
if defined($self->get_package("$foo.$a"));
}
- } elsif ($p_dep =~ m/^(.*)\.win32$/) {
- # a win32 package should *only* be installed if we are installing
- # the win32 arch
- if (grep(/^win32$/,@archs)) {
+ } elsif ($p_dep =~ m/^(.*)\.windows$/) {
+ # a windows package should *only* be installed if we are installing
+ # the windows arch
+ if (grep(/^windows$/,@archs)) {
$install{$p_dep} = 0;
}
} else {
@@ -1187,8 +1187,10 @@ sub platform {
# try to deduce the platform
my $self = shift;
my $ret = $self->setting("platform");
+ #print STDERR "platform $ret set in tlpdb\n" if defined $ret;
return $ret if defined $ret;
# the platform setting wasn't found in the tlpdb, try TLUtils::platform
+ #print STDERR "Setting platform to ",TeXLive::TLUtils::platform(), "\n";
return TeXLive::TLUtils::platform();
}
@@ -1682,7 +1684,7 @@ sub install_package_files {
# Run the post installation code in the postaction tlpsrc entries
# in case we are on w32 and the admin did install for himself only
# we switch off admin mode
- if (win32() && admin() && !$self->option("w32_multi_user")) {
+ if (wndws() && admin() && !$self->option("w32_multi_user")) {
non_admin();
}
# for now desktop_integration maps to both installation
@@ -1831,7 +1833,7 @@ sub not_virtual_install_package {
# will never be installed, and we do already check that there
# are at all src/doc files, which in split packages of the form
# foo.ARCH are not present. And if they are present, than that is fine,
- # too (bin-foobar.win32.doc.tar.xz)
+ # too (bin-foobar.windows.doc.tar.xz)
# - there are actually src/doc files present
if ($container_src_split && $opt_src && $tlpobj->srcfiles) {
my $srccontainer = $container;
@@ -1914,7 +1916,7 @@ sub not_virtual_install_package {
# Run the post installation code in the postaction tlpsrc entries
# in case we are on w32 and the admin did install for himself only
# we switch off admin mode
- if (win32() && admin() && !$totlpdb->option("w32_multi_user")) {
+ if (wndws() && admin() && !$totlpdb->option("w32_multi_user")) {
non_admin();
}
# for now desktop_integration maps to both installation
@@ -2125,7 +2127,7 @@ sub remove_package {
# Run the post installation code in the postaction tlpsrc entries
# in case we are on w32 and the admin did install for himself only
# we switch off admin mode
- if (win32() && admin() && !$localtlpdb->option("w32_multi_user")) {
+ if (wndws() && admin() && !$localtlpdb->option("w32_multi_user")) {
non_admin();
}
#
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm
index 829b7bb9fa..21b9f1f19d 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm
@@ -1,6 +1,6 @@
-# $Id: TLPOBJ.pm 64382 2022-09-14 15:38:18Z karl $
+# $Id: TLPOBJ.pm 65965 2023-02-20 17:26:54Z karl $
# TeXLive::TLPOBJ.pm - module for using tlpobj files
-# Copyright 2007-2022 Norbert Preining
+# Copyright 2007-2023 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
@@ -8,7 +8,7 @@ use strict; use warnings;
package TeXLive::TLPOBJ;
-my $svnrev = '$Revision: 64382 $';
+my $svnrev = '$Revision: 65965 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -680,14 +680,14 @@ sub make_container {
tlwarn("$0: (make_container $containername) $f does not exist\n");
} else {
tlwarn("$0: (make_container $containername) $f not file or symlink\n");
- if (! win32()) {
+ if (! wndws()) {
tlwarn("$0: ", `ls -l $f 2>&1`);
}
}
}
my $tartempfile = "";
- if (win32()) {
+ if (wndws()) {
# Since we provide our own (GNU) tar on Windows, we know it has -T.
my $tmpdir = TeXLive::TLUtils::tl_tmpdir();
$tartempfile = "$tmpdir/mc$$";
@@ -1576,9 +1576,9 @@ with C<|> characters inserted to show the indentation:
|binfiles arch=i386-solaris size=87
| bin/i386-solaris/afm2tfm
| bin/i386-solaris/dvips
- |binfiles arch=win32 size=51
- | bin/win32/afm2tfm.exe
- | bin/win32/dvips.exe
+ |binfiles arch=windows size=51
+ | bin/windows/afm2tfm.exe
+ | bin/windows/dvips.exe
|...
=head1 PACKAGE VARIABLES
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm
index 894dc1b5c9..ae10c29108 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm
@@ -1,6 +1,6 @@
-# $Id: TLPSRC.pm 64610 2022-10-04 19:52:30Z karl $
+# $Id: TLPSRC.pm 66204 2023-02-26 22:10:41Z karl $
# TeXLive::TLPSRC.pm - module for handling tlpsrc files
-# Copyright 2007-2021 Norbert Preining
+# Copyright 2007-2023 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
@@ -14,7 +14,7 @@ use TeXLive::TLUtils;
use TeXLive::TLPOBJ;
use TeXLive::TLTREE;
-my $svnrev = '$Revision: 64610 $';
+my $svnrev = '$Revision: 66204 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -148,12 +148,12 @@ sub from_file {
# check that no variables remain unexpanded, or rather, for any
# remaining $ (which we don't otherwise allow in tlpsrc files, so
# should never occur) ... except for ${ARCH} which we specially
- # expand in TLTREE.pm, and ${global_*} (and ${wndws}) which need to
+ # expand in TLTREE.pm, and ${global_*} which need to
# be defined in 00texlive.autopatterns.tlpsrc. (We distribute one
# file dvi$pdf.bat, but fortunately it is matched by a directory.)
#
(my $testline = $line) =~ s,\$\{ARCH\},,g;
- $testline =~ s,\$\{(global_[^}]*|wndws)\},,g;
+ $testline =~ s,\$\{(global_[^}]*)\},,g;
$testline =~ /\$/
&& die "$srcfile:$lineno: variable undefined or syntax error: $line\n";
#debug: warn "new line $line, from $origline\n" if $origline ne $line;
@@ -161,11 +161,11 @@ sub from_file {
# names of source packages can either be
# - normal names: ^[-\w]+$
- # - win32 specific packages: ^[-\w]+\.win32$
+ # - windows specific packages: ^[-\w]+\.windows$
# - normal texlive specific packages: ^texlive.*\..*$
# - configuration texlive specific packages: ^00texlive.*\..*$
if ($line =~ /^name\s/) {
- $line =~ /^name\s+([-\w]+(\.win32)?|(00)?texlive\..*)$/;
+ $line =~ /^name\s+([-\w]+(\.windows)?|(00)?texlive\..*)$/;
$foundnametag
&& die "$srcfile:$lineno: second name directive not allowed: $line"
. "(have $name)\n";
@@ -492,18 +492,18 @@ sub make_tlpobj {
$finalp = "$pt $pr";
}
# one final trick
- # if the original pattern string matches bin/win32/ then we *only*
- # work on the win32 arch
- if ($finalp =~ m! bin/win32/!) {
- @todoarchs = qw/win32/;
+ # if the original pattern string matches bin/windows/ then we *only*
+ # work on the windows arch
+ if ($finalp =~ m! bin/windows/!) {
+ @todoarchs = qw/windows/;
}
# now @todoarchs contains only those archs for which we want
# to match the pattern
- foreach my $arch (@todoarchs) {
+ foreach my $arch (sort @todoarchs) {
# get only those files matching the pattern
my @archfiles = $tltree->get_matching_files('bin',$finalp, $pkgname, $arch);
if (!@archfiles) {
- if (($arch ne "win32") || defined($::tlpsrc_pattern_warn_win)) {
+ if (($arch ne "windows") || defined($::tlpsrc_pattern_warn_win)) {
tlwarn("$self->{name} ($arch): no hit on binpattern $finalp\n");
}
}
@@ -536,11 +536,11 @@ sub make_tlpobj {
}
# now @todoarchs contains only those archs for which we want
# to match the pattern
- foreach my $arch (@todoarchs) {
+ foreach my $arch (sort @todoarchs) {
# get only those files matching the pattern
my @archfiles = $tltree->get_matching_files('bin', $finalp, $pkgname, $arch);
if (!@archfiles) {
- if (($arch ne "win32") || defined($::tlpsrc_pattern_warn_win)) {
+ if (($arch ne "windows") || defined($::tlpsrc_pattern_warn_win)) {
tlwarn("$self->{name} ($arch): no hit on negative binpattern $finalp\n")
unless $::tlpsrc_pattern_no_warn_negative;
# see comments in libexec/place script.
@@ -588,7 +588,7 @@ sub _do_normal_pattern {
#
# The returned hash has an additional key C<tlpvars> for global tlpsrc
# variables, which can be used in any C<.tlpsrc> files. The names of these
-# variables all start with C<global_>, except for super-special ${wndws}.
+# variables all start with C<global_>.
#
# =cut
# (all doc at bottom, let's not rewrite now.)
@@ -647,7 +647,7 @@ sub find_default_patterns {
# check defined variables to ensure their names start with "global_".
my %gvars = %{$tlsrc->_tlpvars};
for my $v (keys %gvars) {
- if ($v !~ /^(global_[-_a-zA-Z0-9]+|wndws)$/) {
+ if ($v !~ /^(global_[-_a-zA-Z0-9]+)$/) {
tlwarn("$apfile: variable does not start with global_: $v\n")
unless $v eq "PKGNAME";
# the auto-defined PKGNAME is not expected to be global.
@@ -1010,7 +1010,7 @@ definition and expansion.)
Ordinarily, variables can be used only within the C<.tlpsrc> file where
they are defined. There is one exception: global tlpsrc variables can be
defined in the C<00texlive.autopatterns.tlpsrc> file (mentioned below);
-their names must start with C<global_> (plus super-special C<wndws>),
+their names must start with C<global_>,
and can only be used in C<depend>, C<execute>, and C<...pattern>
directives, another C<tlpsetvar>. For example, our
C<autopatterns.tlpsrc> defines:
@@ -1193,7 +1193,7 @@ all available architectures.
=item C<bat/exe/dll/texlua> for Windows
-C<binpattern>s that match Windows, e.g., C<f bin/win32/foobar> or C<f
+C<binpattern>s that match Windows, e.g., C<f bin/windows/foobar> or C<f
bin/${ARCH}/foobar>, also match the files C<foobar.bat>, C<foobar.cmd>,
C<foobar.dll>, C<foobar.exe>, and C<foobar.texlua>.
@@ -1204,7 +1204,7 @@ architectures in one binpattern
binpattern f bin/${ARCH}/dvips
-and would get C<bin/win32/dvips.exe> into the runfiles for C<arch=win32>.
+and would get C<bin/windows/dvips.exe> into the runfiles for C<arch=windows>.
This C<bat>/C<exe>/etc. expansion I<only> works for patterns of the C<f>
type.
@@ -1216,10 +1216,10 @@ package only for some architectures, or for all but some architectures.
This can be done by specifying the list of architectures for which this
pattern should be matched after the pattern specifier using a C</>:
- binpattern f/win32 tlpkg/bin/perl.exe
+ binpattern f/windows tlpkg/bin/perl.exe
will include the file C<tlpkg/bin/perl.exe> only in the binfiles for
-the architecture C<win32>. Another example:
+the architecture C<windows>. Another example:
binpattern f/arch1,arch2,arch3 path/$ARCH/foo/bar
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLTREE.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLTREE.pm
index 674bab2dca..7a5bf62fac 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLTREE.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLTREE.pm
@@ -1,6 +1,6 @@
-# $Id: TLTREE.pm 61372 2021-12-21 22:46:16Z karl $
+# $Id: TLTREE.pm 65994 2023-02-20 23:40:00Z karl $
# TeXLive::TLTREE.pm - work with the tree of all files
-# Copyright 2007-2021 Norbert Preining
+# Copyright 2007-2023 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
@@ -8,7 +8,7 @@ use strict; use warnings;
package TeXLive::TLTREE;
-my $svnrev = '$Revision: 61372 $';
+my $svnrev = '$Revision: 65994 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -434,7 +434,7 @@ sub _get_files_matching_glob_pattern
}
}
- if ($dirpart =~ m,^bin/(win[0-9]|.*-cygwin),
+ if ($dirpart =~ m,^bin/(windows|win[0-9]|.*-cygwin),
|| $dirpart =~ m,tlpkg/installer,) {
# for windows-ish we want to automatch more extensions.
foreach my $f (@candfiles) {
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm
index fc29e5c4e3..c8b1260fcb 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm
@@ -1,6 +1,6 @@
-# $Id: TLUtils.pm 64503 2022-09-25 16:50:19Z karl $
+# $Id: TLUtils.pm 66420 2023-03-07 08:30:26Z preining $
# TeXLive::TLUtils.pm - the inevitable utilities for TeX Live.
-# Copyright 2007-2022 Norbert Preining, Reinhard Kotucha
+# Copyright 2007-2023 Norbert Preining, Reinhard Kotucha
# This file is licensed under the GNU General Public License version 2
# or any later version.
@@ -8,7 +8,7 @@ use strict; use warnings;
package TeXLive::TLUtils;
-my $svnrev = '$Revision: 64503 $';
+my $svnrev = '$Revision: 66420 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -27,7 +27,7 @@ C<TeXLive::TLUtils> - TeX Live infrastructure miscellany
TeXLive::TLUtils::platform();
TeXLive::TLUtils::platform_name($canonical_host);
TeXLive::TLUtils::platform_desc($platform);
- TeXLive::TLUtils::win32();
+ TeXLive::TLUtils::wndws();
TeXLive::TLUtils::unix();
=head2 System tools
@@ -106,12 +106,6 @@ C<TeXLive::TLUtils> - TeX Live infrastructure miscellany
TeXLive::TLUtils::member($item, @list);
TeXLive::TLUtils::merge_into(\%to, \%from);
TeXLive::TLUtils::texdir_check($texdir);
- TeXLive::TLUtils::quotify_path_with_spaces($path);
- TeXLive::TLUtils::conv_to_w32_path($path);
- TeXLive::TLUtils::native_slashify($internal_path);
- TeXLive::TLUtils::forward_slashify($path_from_user);
- TeXLive::TLUtils::give_ctan_mirror();
- TeXLive::TLUtils::give_ctan_mirror_base();
TeXLive::TLUtils::compare_tlpobjs($tlpA, $tlpB);
TeXLive::TLUtils::compare_tlpdbs($tlpdbA, $tlpdbB);
TeXLive::TLUtils::report_tlpdb_differences(\%ret);
@@ -121,6 +115,18 @@ C<TeXLive::TLUtils> - TeX Live infrastructure miscellany
TeXLive::TLUtils::prepend_own_path();
TeXLive::TLUtils::repository_to_array($str);
+=head2 Windows and paths
+
+ TeXLive::TLUtils::quotify_path_with_spaces($path);
+ TeXLive::TLUtils::conv_to_w32_path($path);
+ TeXLive::TLUtils::native_slashify($internal_path);
+ TeXLive::TLUtils::forward_slashify($path_from_user);
+
+=head2 CTAN
+
+ TeXLive::TLUtils::give_ctan_mirror();
+ TeXLive::TLUtils::give_ctan_mirror_base();
+
=head2 JSON
TeXLive::TLUtils::encode_json($ref);
@@ -232,6 +238,7 @@ BEGIN {
&give_ctan_mirror_base
&create_mirror_list
&extract_mirror_entry
+ &system_ok
&wsystem
&xsystem
&run_cmd
@@ -265,7 +272,7 @@ BEGIN {
@EXPORT = qw(setup_programs download_file process_logging_options
tldie tlwarn info log debug ddebug dddebug debug
debug_hash_str debug_hash
- win32 xchdir xsystem run_cmd system_pipe sort_archs);
+ wndws xchdir xsystem run_cmd system_pipe sort_archs);
}
use Cwd;
@@ -285,7 +292,7 @@ our $SshURIRegex = '^((ssh|scp)://([^@]*)@([^/]*)/|([^@]*)@([^:]*):).*$';
=item C<platform>
If C<$^O =~ /MSWin/i> is true we know that we're on
-Windows and we set the global variable C<$::_platform_> to C<win32>.
+Windows and we set the global variable C<$::_platform_> to C<windows>.
Otherwise we call C<platform_name> with the output of C<config.guess>
as argument.
@@ -297,13 +304,16 @@ understands the C<$(...)> construct. This means that on old-enough
systems, such as Solaris, we have to look for a shell. We use the value
of the C<CONFIG_SHELL> environment variable if it is set, else
C</bin/ksh> if it exists, else C</bin/bash> if it exists, else give up.
+Happily, C<config.guess> later reverted this change, but we keep our
+shell-finding code anyway to defend against future mistakes of the same ilk.
=cut
sub platform {
- unless (defined $::_platform_) {
+ if (! defined $::_platform_) {
if ($^O =~ /^MSWin/i) {
- $::_platform_ = "win32";
+ # print STDERR "\$^O is $^O\n";
+ $::_platform_ = "windows";
} else {
my $config_guess = "$::installerdir/tlpkg/installer/config.guess";
@@ -528,7 +538,8 @@ sub platform_desc {
'sparc-linux' => 'GNU/Linux on Sparc',
'sparc-solaris' => 'Solaris on Sparc',
'universal-darwin' => 'MacOSX current (10.14-) on ARM/x86_64',
- 'win32' => 'Windows',
+ 'win32' => 'Windows (32-bit)',
+ 'windows' => 'Windows (64-bit)',
'x86_64-cygwin' => 'Cygwin on x86_64',
'x86_64-darwinlegacy' => 'MacOSX legacy (10.6-) on x86_64',
'x86_64-dragonfly' => 'DragonFlyBSD on x86_64',
@@ -551,21 +562,21 @@ sub platform_desc {
}
-=item C<win32>
+=item C<wndws>
Return C<1> if platform is Windows and C<0> otherwise. The test is
currently based on the value of Perl's C<$^O> variable.
=cut
-sub win32 {
+sub wndws {
if ($^O =~ /^MSWin/i) {
return 1;
} else {
return 0;
}
# the following needs config.guess, which is quite bad ...
- # return (&platform eq "win32")? 1:0;
+ # return (&platform eq "windows")? 1:0;
}
@@ -576,7 +587,7 @@ Return C<1> if platform is UNIX and C<0> otherwise.
=cut
sub unix {
- return (&platform eq "win32")? 0:1;
+ return (&platform eq "windows")? 0:1;
}
@@ -600,7 +611,7 @@ sub getenv {
my $envvar=shift;
my $var=$ENV{"$envvar"};
return 0 unless (defined $var);
- if (&win32) {
+ if (&wndws) {
$var=~s!\\!/!g; # change \ -> / (required by Perl)
}
return "$var";
@@ -622,7 +633,7 @@ sub which {
my @PATH;
my $PATH = getenv('PATH');
- if (&win32) {
+ if (&wndws) {
my @PATHEXT = split (';', getenv('PATHEXT'));
push (@PATHEXT, ''); # in case argument contains an extension
@PATH = split (';', $PATH);
@@ -700,6 +711,19 @@ sub xchdir {
ddebug("xchdir($dir) ok\n");
}
+=item C<system_ok($cmdline)>
+
+Run C<system($cmdline)> and return true if return status was zero, false
+if status was nonzero. Throw away stdout and stderr.
+
+=cut
+
+sub system_ok {
+ my $nulldev = nulldev();
+ my ($cmdline) = @_;
+ `$cmdline >$nulldev 2>&1`;
+ return $? == 0;
+}
=item C<wsystem($msg, @args)>
@@ -789,7 +813,7 @@ sub system_pipe {
my ($prog, $infile, $outfile, $removeIn, @extraargs) = @_;
my $progQuote = quotify_path_with_spaces($prog);
- if (win32()) {
+ if (wndws()) {
$infile =~ s!/!\\!g;
$outfile =~ s!/!\\!g;
}
@@ -822,7 +846,7 @@ computing the disk space.
sub diskfree {
my $td = shift;
my ($output, $retval);
- if (win32()) {
+ if (wndws()) {
# the powershell one-liner only works from win8 on.
my @winver = Win32::GetOSVersion();
if ($winver[1]<=6 && $winver[2]<=1) {
@@ -875,19 +899,23 @@ sub diskfree {
$td .= "/" if ($td !~ m!/$!);
return (-1) if (! -e $td);
debug("checking diskfree() in $td\n");
- ($output, $retval) = run_cmd("df -P \"$td\"", POSIXLY_CORRECT => 1);
+ ($output, $retval) = run_cmd("df -Pk \"$td\"");
+ # With -k (mandated by POSIX), we should always get 1024-blocks.
+ # Otherwise, the POSIXLY_CORRECT envvar for GNU df would need to
+ # be set, to force 512-blocks; and the BLOCKSIZE envvar would need
+ # to be unset to avoid overriding.
if ($retval == 0) {
# Output format should be this:
- # Filesystem 512-blocks Used Available Capacity Mounted on
- # /dev/sdb3 6099908248 3590818104 2406881416 60% /home
+ # Filesystem 1024-blocks Used Available Capacity Mounted on
+ # /dev/sdb3 209611780 67718736 141893044 33% /
my ($h,$l) = split(/\n/, $output);
my ($fs, $nrb, $used, $avail, @rest) = split(' ', $l);
- debug("diskfree: used=$used (512-block), avail=$avail (512-block)\n");
- # $avail is in 512-byte blocks, so we need to divide by 2*1024 to
- # obtain Mb. Require that at least 100M remain free.
- return (int($avail / 2048));
+ debug("diskfree: df -Pk output: $output");
+ debug("diskfree: used=$used (1024-block), avail=$avail (1024-block)\n");
+ # $avail is in 1024-byte blocks, so we divide by 1024 to obtain Mb.
+ return (int($avail / 1024));
} else {
- # error in running df -P for whatever reason
+ # error in running df -P for whatever reason, just skip the check.
return (-1);
}
}
@@ -905,7 +933,7 @@ my $user_home_dir;
sub get_user_home {
return $user_home_dir if ($user_home_dir);
- $user_home_dir = getenv (win32() ? 'USERPROFILE' : 'HOME') || '~';
+ $user_home_dir = getenv (wndws() ? 'USERPROFILE' : 'HOME') || '~';
return $user_home_dir;
}
@@ -940,7 +968,7 @@ Return both C<dirname> and C<basename>. Example:
sub dirname_and_basename {
my $path=shift;
my ($share, $base) = ("", "");
- if (win32) {
+ if (wndws()) {
$path=~s!\\!/!g;
}
# do not try to make sense of paths ending with /..
@@ -949,7 +977,7 @@ sub dirname_and_basename {
# eliminate `/.' path components
while ($path =~ s!/\./!/!) {};
# UNC path? => first split in $share = //xxx/yy and $path = /zzzz
- if (win32() and $path =~ m!^(//[^/]+/[^/]+)(.*)$!) {
+ if (wndws() and $path =~ m!^(//[^/]+/[^/]+)(.*)$!) {
($share, $path) = ($1, $2);
if ($path =~ m!^/?$!) {
$path = $share;
@@ -1007,7 +1035,7 @@ sub basename {
sub tl_abs_path {
my $path = shift;
- if (win32) {
+ if (wndws()) {
$path=~s!\\!/!g;
}
if (-e $path) {
@@ -1017,13 +1045,13 @@ sub tl_abs_path {
} else{
# collapse /./ components
$path =~ s!/\./!/!g;
- # no support for .. path components or for win32 long-path syntax
+ # no support for .. path components or for windows long-path syntax
# (//?/ path prefix)
die "Unsupported path syntax" if $path =~ m!/\.\./! || $path =~ m!/\.\.$!
|| $path =~ m!^\.\.!;
- die "Unsupported path syntax" if win32() && $path =~ m!^//\?/!;
+ die "Unsupported path syntax" if wndws() && $path =~ m!^//\?/!;
if ($path !~ m!^(.:)?/!) { # relative path
- if (win32() && $path =~ /^.:/) { # drive letter
+ if (wndws() && $path =~ /^.:/) { # drive letter
my $dcwd;
# starts with drive letter: current dir on drive
$dcwd = Cwd::getdcwd ($1);
@@ -1057,7 +1085,7 @@ sub dir_slash {
sub dir_creatable {
my $path=shift;
#print STDERR "testing $path\n";
- $path =~ s!\\!/!g if win32;
+ $path =~ s!\\!/!g if wndws;
return 0 unless -d $path;
$path .= '/' unless $path =~ m!/$!;
#print STDERR "testing $path\n";
@@ -1099,7 +1127,7 @@ a fileserver.
sub dir_writable {
my ($path) = @_;
return 0 unless -d $path;
- $path =~ s!\\!/!g if win32;
+ $path =~ s!\\!/!g if wndws;
$path .= '/' unless $path =~ m!/$!;
my $i = 0;
my $f;
@@ -1143,9 +1171,9 @@ sub mkdirhier {
$ret = 1;
} else {
my $subdir = "";
- # win32 is special as usual: we need to separate //servername/ part
+ # windows is special as usual: we need to separate //servername/ part
# from the UNC path, since (! -d //servername/) tests true
- $subdir = $& if ( win32() && ($tree =~ s!^//[^/]+/!!) );
+ $subdir = $& if ( wndws() && ($tree =~ s!^//[^/]+/!!) );
my @dirs = split (/[\/\\]/, $tree);
for my $dir (@dirs) {
@@ -1618,13 +1646,13 @@ sub removed_dirs {
# what should we do with not existing entries????
next if (! -r "$f");
my $abs_f = Cwd::abs_path ($f);
- # the following is necessary because on win32,
+ # the following is necessary because on windows,
# abs_path("tl-portable")
# returns
# c:\tl test\...
# and not forward slashes, while, if there is already a forward /
# in the path, also the rest is done with forward slashes.
- $abs_f =~ s!\\!/!g if win32();
+ $abs_f =~ s!\\!/!g if wndws();
if (!$abs_f) {
warn ("oops, no abs_path($f) from " . `pwd`);
next;
@@ -1884,7 +1912,7 @@ sub do_postaction {
sub _do_postaction_fileassoc {
my ($how, $mode, $tlpobj, $pa) = @_;
- return 1 unless win32();
+ return 1 unless wndws();
my ($errors, %keyval) =
parse_into_keywords($pa, qw/extension filetype/);
@@ -1922,7 +1950,7 @@ sub _do_postaction_fileassoc {
sub _do_postaction_filetype {
my ($how, $tlpobj, $pa) = @_;
- return 1 unless win32();
+ return 1 unless wndws();
my ($errors, %keyval) =
parse_into_keywords($pa, qw/name cmd/);
@@ -1967,7 +1995,7 @@ sub _do_postaction_filetype {
# associated program shows up in `open with' menu
sub _do_postaction_progid {
my ($how, $tlpobj, $pa) = @_;
- return 1 unless win32();
+ return 1 unless wndws();
my ($errors, %keyval) =
parse_into_keywords($pa, qw/extension filetype/);
@@ -2017,7 +2045,7 @@ sub _do_postaction_script {
return 0;
}
my $file = $keyval{'file'};
- if (win32() && defined($keyval{'filew32'})) {
+ if (wndws() && defined($keyval{'filew32'})) {
$file = $keyval{'filew32'};
}
my $texdir = `kpsewhich -var-value=TEXMFROOT`;
@@ -2047,7 +2075,7 @@ sub _do_postaction_script {
sub _do_postaction_shortcut {
my ($how, $tlpobj, $do_menu, $do_desktop, $pa) = @_;
- return 1 unless win32();
+ return 1 unless wndws();
my ($errors, %keyval) =
parse_into_keywords($pa, qw/type name icon cmd args hide/);
@@ -2318,7 +2346,7 @@ sub add_remove_symlinks {
my $plat_bindir = "$Master/bin/$arch";
# nothing to do with symlinks on Windows, of course.
- return if win32();
+ return if wndws();
my $info_dir = "$Master/texmf-dist/doc/info";
if ($mode eq "add") {
@@ -2404,7 +2432,7 @@ be called to make the changes immediately visible.
sub w32_add_to_path {
my ($bindir, $multiuser) = @_;
- return if (!win32());
+ return if (!wndws());
my $path = TeXLive::TLWinGoo::get_system_env() -> {'/Path'};
$path =~ s/[\s\x00]+$//;
@@ -2649,7 +2677,7 @@ sub untar {
# on w32 don't extract file modified time, because AV soft can open
# files in the mean time causing time stamp modification to fail
- my $taropt = win32() ? "xmf" : "xf";
+ my $taropt = wndws() ? "xmf" : "xf";
if (system($tar, $taropt, $tarfile) != 0) {
tlwarn("TLUtils::untar: $tar $taropt $tarfile failed (in $targetdir)\n");
$ret = 0;
@@ -3147,7 +3175,7 @@ sub _download_file_lwp {
sub _download_file_program {
my ($url, $dest, $type) = @_;
- if (win32()) {
+ if (wndws()) {
$dest =~ s!/!\\!g;
}
@@ -3196,7 +3224,7 @@ Return C</dev/null> on Unix and C<nul> on Windows.
=cut
sub nulldev {
- return (&win32()) ? 'nul' : '/dev/null';
+ return (&wndws()) ? 'nul' : '/dev/null';
}
=item C<get_full_line ($fh)>
@@ -4059,7 +4087,7 @@ sub texdir_check {
# Unfortunately we have lots of special characters.
# On Windows, backslashes are normal but will already have been changed
# to slashes by tl_abs_path. And we should only check for : on Unix.
- my $colon = win32() ? "" : ":";
+ my $colon = wndws() ? "" : ":";
if ($texdir =~ /[,$colon;\\{}\$]/) {
if ($warn) {
print " !! TEXDIR value has problematic characters: $orig_texdir\n";
@@ -4072,7 +4100,7 @@ sub texdir_check {
return 0;
}
# w32: for now, reject the root of a samba share
- return 0 if win32() && $texdir =~ m!^//[^/]+/[^/]+$!;
+ return 0 if wndws() && $texdir =~ m!^//[^/]+/[^/]+$!;
# if texdir already exists, make sure we can write into it.
return dir_writable($texdir) if (-d $texdir);
@@ -4103,7 +4131,7 @@ are (erroneously) eradicated.
sub quotify_path_with_spaces {
my $p = shift;
- my $m = win32() ? '[+=^&();,!%\s]' : '.';
+ my $m = wndws() ? '[+=^&();,!%\s]' : '.';
if ( $p =~ m/$m/ ) {
$p =~ s/"//g; # remove any existing double quotes
$p = "\"$p\"";
@@ -4151,13 +4179,13 @@ slashes after reading a path. They both are no-ops on Unix.
sub native_slashify {
my ($r) = @_;
- $r =~ s!/!\\!g if win32();
+ $r =~ s!/!\\!g if wndws();
return $r;
}
sub forward_slashify {
my ($r) = @_;
- $r =~ s!\\!/!g if win32();
+ $r =~ s!\\!/!g if wndws();
return $r;
}
@@ -4239,7 +4267,7 @@ END_NO_SSL
#
sub query_ctan_mirror_curl {
my $max_trial = 3;
- my $warg = (win32() ? '-w "%{url_effective}" ' : "-w '%{url_effective}' ");
+ my $warg = (wndws() ? '-w "%{url_effective}" ' : "-w '%{url_effective}' ");
for (my $i = 1; $i <= $max_trial; $i++) {
# -L -> follow redirects
# -s -> silent
@@ -4846,7 +4874,7 @@ sub mktexupd {
die "mktexupd: exec file does not exist: $file" if (! -f $file);
}
}
- my $delim= (&win32)? ';' : ':';
+ my $delim= (&wndws)? ';' : ':';
my $TEXMFDBS;
chomp($TEXMFDBS=`kpsewhich --show-path="ls-R"`);
@@ -4856,8 +4884,8 @@ sub mktexupd {
foreach my $path (keys %files) {
foreach my $db (@texmfdbs) {
$db=substr($db, -1) if ($db=~m|/$|); # strip leading /
- $db = lc($db) if win32();
- my $up = (win32() ? lc($path) : $path);
+ $db = lc($db) if wndws();
+ my $up = (wndws() ? 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".
@@ -4989,7 +5017,7 @@ directory for PATH.
sub prepend_own_path {
my $bindir = dirname(Cwd::abs_path(which('kpsewhich')));
- if (win32()) {
+ if (wndws()) {
$bindir =~ s!\\!/!g;
$ENV{'PATH'} = "$bindir;$ENV{PATH}";
} else {
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLWinGoo.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLWinGoo.pm
index 5e989a197f..e468d8719a 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLWinGoo.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLWinGoo.pm
@@ -1,6 +1,6 @@
-# $Id: TLWinGoo.pm 63068 2022-04-18 05:58:07Z preining $
+# $Id: TLWinGoo.pm 65994 2023-02-20 23:40:00Z karl $
# TeXLive::TLWinGoo.pm - Windows goop.
-# Copyright 2008-2021 Siep Kroonenberg, Norbert Preining
+# Copyright 2008-2023 Siep Kroonenberg, Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
@@ -13,7 +13,7 @@
package TeXLive::TLWinGoo;
-my $svnrev = '$Revision: 63068 $';
+my $svnrev = '$Revision: 65994 $';
my $_modulerevision;
if ($svnrev =~ m/: ([0-9]+) /) {
$_modulerevision = $1;
@@ -1167,7 +1167,7 @@ sub create_uninstaller {
my $td = $td_fw;
$td =~ s!/!\\!g;
- my $tdmain = `"$td\\bin\\win32\\kpsewhich" -var-value=TEXMFMAIN`;
+ my $tdmain = `"$td\\bin\\windows\\kpsewhich" -var-value=TEXMFMAIN`;
$tdmain =~ s!/!\\!g;
chomp $tdmain;
@@ -1182,7 +1182,7 @@ sub create_uninstaller {
print UNINST <<UNEND;
rem \@echo off
setlocal
-path $td\\tlpkg\\tlperl\\bin;$td\\bin\\win32;%path%
+path $td\\tlpkg\\tlperl\\bin;$td\\bin\\windows;%path%
set PERL5LIB=$td\\tlpkg\\tlperl\\lib
rem Clean environment from other Perl variables
set PERL5OPT=
@@ -1203,7 +1203,7 @@ set PERL_ROOT=
set PERL_SIGNALS=
set PERL_UNICODE=
-perl.exe \"$tdmain\\scripts\\texlive\\uninstall-win32.pl\" \%1
+perl.exe \"$tdmain\\scripts\\texlive\\uninstall-windows.pl\" \%1
if errorlevel 1 goto :eof
rem test for taskkill and try to stop exit tray menu
@@ -1242,7 +1242,7 @@ del /q \"$td\\release-texlive.txt\"
UNEND2
;
for my $d ('TEXMFSYSVAR', 'TEXMFSYSCONFIG') {
- my $kd = `"$td\\bin\\win32\\kpsewhich" -var-value=$d`;
+ my $kd = `"$td\\bin\\windows\\kpsewhich" -var-value=$d`;
chomp $kd;
print UNINST2 "rmdir /s /q \"", $kd, "\"\r\n";
}