summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-07-04 21:19:25 +0000
committerKarl Berry <karl@freefriends.org>2018-07-04 21:19:25 +0000
commita2dda8b02b5516aca742efff690705ee720d810a (patch)
treed93ca539e1ece6e3e27e96fb7182c730d608a05f
parent9d5e239b66f12f75c7e0b7c869bbacd18429130d (diff)
doc,sync,exec
git-svn-id: svn://tug.org/texlive/trunk@48133 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/doc/build-tools.txt2
-rw-r--r--Build/source/doc/tlbuild.info2
-rw-r--r--Build/source/doc/tlbuild.texi13
-rw-r--r--Build/source/texk/tests/TeXLive/TLConfig.pm48
-rw-r--r--Build/source/texk/tests/TeXLive/TLUtils.pm96
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/fmtutil.pl37
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl102
-rwxr-xr-xBuild/source/texk/texlive/w32_wrapper/runscript.tlu15
-rw-r--r--[-rwxr-xr-x]Master/tlpkg/tlpsrc/lni.tlpsrc0
9 files changed, 200 insertions, 115 deletions
diff --git a/Build/source/doc/build-tools.txt b/Build/source/doc/build-tools.txt
index aa2b9e5330c..73d8aead3c9 100644
--- a/Build/source/doc/build-tools.txt
+++ b/Build/source/doc/build-tools.txt
@@ -1,6 +1,6 @@
autoconf (GNU Autoconf) 2.69
automake (GNU automake) 1.16.1
-bison (GNU Bison) 3.0.4
+bison (GNU Bison) 3.0.5
flex 2.6.0
ltmain.sh (GNU libtool) 2.4.6
m4 (GNU M4) 1.4.18
diff --git a/Build/source/doc/tlbuild.info b/Build/source/doc/tlbuild.info
index fba9c2a0ce9..62391d8af73 100644
--- a/Build/source/doc/tlbuild.info
+++ b/Build/source/doc/tlbuild.info
@@ -711,7 +711,7 @@ many extra hassles, so don't do that, tempting as it may be.
autoconf (GNU Autoconf) 2.69
automake (GNU automake) 1.16.1
- bison (GNU Bison) 3.0.4
+ bison (GNU Bison) 3.0.5
flex 2.6.0
ltmain.sh (GNU libtool) 2.4.6
m4 (GNU M4) 1.4.18
diff --git a/Build/source/doc/tlbuild.texi b/Build/source/doc/tlbuild.texi
index 806bff77e9c..c74901466f6 100644
--- a/Build/source/doc/tlbuild.texi
+++ b/Build/source/doc/tlbuild.texi
@@ -474,7 +474,8 @@ make check
@end example
Then you modify source files in @file{mydir/texk/dvipdfm-x} and rerun
-@code{make} in @file{mydir/Work/texk/dvipdfm-x} to rebuild.
+@code{make} in @file{mydir/Work/texk/dvipdfm-x} to rebuild (that
+build directory is where the binaries end up).
The second line of the @code{configure} invocation shows examples of
extra things you likely want to specify if you intend to hack the
@@ -488,15 +489,15 @@ tweak as desired; check the output from @code{configure --help}.
@cindex size of source tree
Finally, the above retrieves the entire TL source tree (several
-hundred megabytes). It is natural to ask if this is really necessary.
+hundred megabytes). It is natural to ask if this is really necessary.
Strictly speaking, the answer is no, but it is vastly more convenient
-to do so. If you cut down the source tree, you must also give
+to do so. If you cut down the source tree, you must also give
additional @code{configure} flags to individually disable using system
versions of libraries, or the intricacies of the dependencies (such as
@code{teckit} requiring @code{zlib}) will have undesired side effects.
For an example, see the @code{build-pdftex.sh} script in the
-@code{pdftex} development source (@url{http://pdftex.org}), which is
-indeed a cut-down TL source tree.
+@code{pdftex} development source (details at @url{http://pdftex.org}),
+which is indeed a cut-down TL source tree.
@vindex --enable-missing @r{to ignore dependencies}
Even with @code{--disable-all-pkgs}, dependencies will be checked.
@@ -675,7 +676,7 @@ source tree.
@pindex plain.tex@r{, not in source tree}
The main consideration is that @code{make install} is not enough to
make a usable @TeX{} installation. Beyond the compiled binaries,
-(thousands of) support files are needed; just as a first example
+(thousands of) support files are needed; just as a first example,
@file{plain.tex} is not in the source tree.
These support files are maintained completely independently and are
diff --git a/Build/source/texk/tests/TeXLive/TLConfig.pm b/Build/source/texk/tests/TeXLive/TLConfig.pm
index afafeea13c3..3efef6a5c96 100644
--- a/Build/source/texk/tests/TeXLive/TLConfig.pm
+++ b/Build/source/texk/tests/TeXLive/TLConfig.pm
@@ -1,4 +1,4 @@
-# $Id: TLConfig.pm 47938 2018-06-06 01:35:10Z preining $
+# $Id: TLConfig.pm 48093 2018-06-26 21:03:56Z preining $
# TeXLive::TLConfig.pm - module exporting configuration values
# Copyright 2007-2018 Norbert Preining
# This file is licensed under the GNU General Public License version 2
@@ -6,7 +6,7 @@
package TeXLive::TLConfig;
-my $svnrev = '$Revision: 47938 $';
+my $svnrev = '$Revision: 48093 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -27,14 +27,8 @@ BEGIN {
%FallbackDownloaderProgram
%FallbackDownloaderArgs
$DefaultCompressorFormat
- $DefaultContainerExtension
- @AcceptedCompressors
- $AcceptedCompressorsRegexp
- %CompressorProgram
- %DecompressorProgram
- %CompressorArgs
- %DecompressorArgs
- %CompressorExtension
+ $CompressorExtRegexp
+ %Compressors
$InfraLocation
$DatabaseName
$PackageBackupDir
@@ -122,22 +116,36 @@ our $DefaultFallbackDownloader = "wget";
our @AcceptedFallbackDownloaders = qw/curl wget/;
our %FallbackDownloaderProgram = ( 'wget' => 'wget', 'curl' => 'curl');
our %FallbackDownloaderArgs = (
- 'curl' => ['--user-agent', 'texlive/curl', '--retry', '10',
+ 'curl' => ['--user-agent', 'texlive/curl', '--retry', '10', '--fail', '--location',
'--connect-timeout', "$NetworkTimeout", '--silent', '--output'],
'wget' => ['--user-agent=texlive/wget', '--tries=10',
"--timeout=$NetworkTimeout", '-q', '-O'],
);
# the way we package things on the web
our $DefaultCompressorFormat = "xz";
-our $DefaultContainerExtension = "tar.$DefaultCompressorFormat";
-# mind that the order here is important as gives also the preference!
-our @AcceptedCompressors = qw/lz4 gzip xz/;
-our $AcceptedCompressorsRegexp = "(xz|lz4|gzip)";
-our %CompressorProgram = ( 'xz' => 'xz', 'gzip' => 'gzip', 'lz4' => 'lz4');
-our %CompressorExtension = ( 'xz' => 'xz', 'gzip' => 'gz', 'lz4' => 'lz4');
-our %CompressorArgs = ( 'xz' => ['-zf'], 'gzip' => [ '-f' ], 'lz4' => ['-zfm', '--rm', '-q']);
-our %DecompressorProgram = ( 'xz' => 'xz', 'gzip' => 'gzip', 'lz4' => 'lz4');
-our %DecompressorArgs = ( 'xz' => ['-dcf'], 'gzip' => ['-dcf'], 'lz4' => ['-dcf']);
+# priority defines which compressor is selected for backups/rollback containers
+# less is better
+our %Compressors = (
+ "lz4" => {
+ "decompress_args" => ["-dcf"],
+ "compress_args" => ["-zfmq", "--rm"],
+ "extension" => "lz4",
+ "priority" => 10,
+ },
+ "gzip" => {
+ "decompress_args" => ["-dcf"],
+ "compress_args" => ["-f"],
+ "extension" => "gz",
+ "priority" => 20,
+ },
+ "xz" => {
+ "decompress_args" => ["-dcf"],
+ "compress_args" => ["-zf"],
+ "extension" => "xz",
+ "priority" => 30,
+ },
+);
+our $CompressorExtRegexp = "(" . join("|", map { $Compressors{$_}{'extension'} } keys(%Compressors)) . ")";
# archive (not user) settings.
# these can be overridden by putting them into 00texlive.config.tlpsrc
diff --git a/Build/source/texk/tests/TeXLive/TLUtils.pm b/Build/source/texk/tests/TeXLive/TLUtils.pm
index 0c3f8419fcc..372009d16c1 100644
--- a/Build/source/texk/tests/TeXLive/TLUtils.pm
+++ b/Build/source/texk/tests/TeXLive/TLUtils.pm
@@ -1,4 +1,4 @@
-# $Id: TLUtils.pm 47887 2018-05-31 16:50:47Z karl $
+# $Id: TLUtils.pm 48130 2018-07-03 22:24:07Z preining $
# TeXLive::TLUtils.pm - the inevitable utilities for TeX Live.
# Copyright 2007-2018 Norbert Preining, Reinhard Kotucha
# This file is licensed under the GNU General Public License version 2
@@ -6,7 +6,7 @@
package TeXLive::TLUtils;
-my $svnrev = '$Revision: 47887 $';
+my $svnrev = '$Revision: 48130 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -39,6 +39,7 @@ C<TeXLive::TLUtils> -- utilities used in TeX Live infrastructure
TeXLive::TLUtils::wsystem($msg,@args);
TeXLive::TLUtils::xsystem(@args);
TeXLive::TLUtils::run_cmd($cmd);
+ TeXLive::TLUtils::system_pipe($prog, $infile, $outfile, $removeIn, @extraargs);
=head2 File utilities
@@ -177,6 +178,7 @@ BEGIN {
&wsystem
&xsystem
&run_cmd
+ &system_pipe
&announce_execute_actions
&add_symlinks
&remove_symlinks
@@ -202,7 +204,7 @@ BEGIN {
);
@EXPORT = qw(setup_programs download_file process_logging_options
tldie tlwarn info log debug ddebug dddebug debug_hash
- win32 xchdir xsystem run_cmd sort_archs);
+ win32 xchdir xsystem run_cmd system_pipe sort_archs);
}
use Cwd;
@@ -623,6 +625,37 @@ sub run_cmd {
return ($output,$retval);
}
+=item C<system_pipe($prog, $infile, $outfile, $removeIn, @extraargs)>
+
+Runs C<$prog> with C<@extraargs> redirecting stdin from C<$infile>, stdout to C<$outfile>.
+Removes C<$infile> if C<$removeIn> is true.
+
+=cut
+
+sub system_pipe {
+ my ($prog, $infile, $outfile, $removeIn, @extraargs) = @_;
+
+ my $progQuote = quotify_path_with_spaces($prog);
+ if (win32()) {
+ $infile =~ s!/!\\!g;
+ $outfile =~ s!/!\\!g;
+ }
+ my $infileQuote = "\"$infile\"";
+ my $outfileQuote = "\"$outfile\"";
+ debug("TLUtils::system_pipe: calling $progQuote @extraargs < $infileQuote > $outfileQuote\n");
+ my $retval = system("$progQuote @extraargs < $infileQuote > $outfileQuote");
+ if ($retval != 0) {
+ $retval /= 256 if $retval > 0;
+ debug("TLUtils::system_pipe: system exit code = $retval\n");
+ return 0;
+ } else {
+ if ($removeIn) {
+ debug("TLUtils::system_pipe: removing $infile\n");
+ unlink($infile);
+ }
+ return 1;
+ }
+}
=back
@@ -2136,31 +2169,23 @@ sub unpack {
return (0, "nothing to unpack");
}
- my $type;
+ my $decompressorType;
my $compressorextension;
- for my $comptype (@AcceptedCompressors) {
- my $ext = $CompressorExtension{$comptype};
- if ($what =~ m/\.tar\.$ext$/) {
- $type = $comptype;
- $compressorextension = $ext;
- }
+ if ($what =~ m/\.tar\.$CompressorExtRegexp$/) {
+ $compressorextension = $1;
+ $decompressorType = $1 eq "gz" ? "gzip" : $1;
}
- if (!$type) {
+ if (!$decompressorType) {
return(0, "don't know how to unpack");
}
# make sure that the found uncompressor type is also available
- if (!member($type, @{$::progs{'working_compressors'}})) {
- return(0, "unsupported container format $type");
+ if (!member($decompressorType, @{$::progs{'working_compressors'}})) {
+ return(0, "unsupported container format $decompressorType");
}
# only check the necessary compressor program
- my $decompressor = TeXLive::TLUtils::quotify_path_with_spaces(
- $::progs{$DecompressorProgram{$type}});
- my @decompressorArgs = @{$DecompressorArgs{$type}};
- if (!defined($decompressor)) {
- return (0, "programs not set up properly");
- }
-
+ my $decompressor = $::progs{$decompressorType};
+ my @decompressorArgs = @{$Compressors{$decompressorType}{'decompress_args'}};
my $fn = basename($what);
my $pkg = $fn;
@@ -2169,17 +2194,6 @@ sub unpack {
my $containerfile = "$tempdir/$fn";
my $tarfile = "$tempdir/$fn";
$tarfile =~ s/\.$compressorextension$//;
- my $containerfile_quote;
- my $tarfile_quote;
- my $target_quote;
- if (win32()) {
- $containerfile =~ s!/!\\!g;
- $tarfile =~ s!/!\\!g;
- $target =~ s!/!\\!g;
- }
- $containerfile_quote = "\"$containerfile\"";
- $tarfile_quote = "\"$tarfile\"";
- $target_quote = "\"$target\"";
if ($what =~ m,^(https?|ftp)://, || $what =~ m!$SshURIRegex!) {
# we are installing from the NET
# check for the presence of $what in $tempdir
@@ -2210,14 +2224,12 @@ sub unpack {
# we can remove it afterwards
$remove_containerfile = 1;
}
- debug("decompressing $containerfile to $tarfile\n");
- debug("calling $decompressor @decompressorArgs < $containerfile_quote > $tarfile_quote\n");
- system("$decompressor @decompressorArgs < $containerfile_quote > $tarfile_quote");
- if (! -f $tarfile) {
+ if (!system_pipe($decompressor, $containerfile, $tarfile, $remove_container, @decompressorArgs)
+ ||
+ ! -f $tarfile) {
unlink($tarfile, $containerfile);
return(0, "Decompressing $containerfile failed");
}
- unlink($containerfile) if $remove_containerfile;
if (untar($tarfile, $target, 1)) {
return (1, "$pkg");
} else {
@@ -2364,16 +2376,15 @@ sub setup_programs {
}
$::progs{'working_downloaders'} = [ @working_downloaders ];
my @working_compressors;
- for my $comptype (@AcceptedCompressors) {
- my $defprog = $CompressorProgram{$comptype};
+ for my $defprog (sort {$Compressors{$a}{'priority'} <=> $Compressors{$b}{'priority'}} keys %Compressors) {
# do not warn on errors
if (setup_one(($isWin ? "w32" : "unix"), $defprog,
- "$bindir/$comptype/$defprog.$platform", "--version", 1)) {
- push @working_compressors, $comptype;
+ "$bindir/$defprog/$defprog.$platform", "--version", 1)) {
+ push @working_compressors, $defprog;
# also set up $::{'compressor'} if not already done
# this selects the first one, but we might reset this depending on
# TEXLIVE_COMPRESSOR setting, see below
- defined($::progs{'compressor'}) || ($::progs{'compressor'} = $comptype);
+ defined($::progs{'compressor'}) || ($::progs{'compressor'} = $defprog);
}
}
$::progs{'working_compressors'} = [ @working_compressors ];
@@ -3897,7 +3908,8 @@ sub slurp_file {
=item C<< download_to_temp_or_file($url) >>
-If C<$url> tries to download the file into a temporary file.
+If C<$url> is a url, tries to download the file into a temporary file.
+Otherwise assume that C<$url> is a local file.
In both cases returns the local file.
Returns the local file name if succeeded, otherwise undef.
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl b/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl
index 5cc7a8e2daf..6deac084cd9 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-# $Id: fmtutil.pl 47929 2018-06-05 02:23:02Z preining $
+# $Id: fmtutil.pl 48129 2018-07-03 22:15:38Z karl $
# fmtutil - utility to maintain format files.
# (Maintained in TeX Live:Master/texmf-dist/scripts/texlive.)
#
@@ -24,11 +24,11 @@ BEGIN {
TeX::Update->import();
}
-my $svnid = '$Id: fmtutil.pl 47929 2018-06-05 02:23:02Z preining $';
-my $lastchdate = '$Date: 2018-06-05 04:23:02 +0200 (Tue, 05 Jun 2018) $';
+my $svnid = '$Id: fmtutil.pl 48129 2018-07-03 22:15:38Z karl $';
+my $lastchdate = '$Date: 2018-07-04 00:15:38 +0200 (Wed, 04 Jul 2018) $';
$lastchdate =~ s/^\$Date:\s*//;
$lastchdate =~ s/ \(.*$//;
-my $svnrev = '$Revision: 47929 $';
+my $svnrev = '$Revision: 48129 $';
$svnrev =~ s/^\$Revision:\s*//;
$svnrev =~ s/\s*\$$//;
my $version = "r$svnrev ($lastchdate)";
@@ -909,6 +909,8 @@ sub callback_list_cfg {
@lines = map { $_->[1] } sort { $a->[0] cmp $b->[0] } @lines;
print "List of all formats:\n";
print @lines;
+
+ return @lines == 0; # only return failure if no formats.
}
@@ -950,27 +952,46 @@ sub read_fmtutil_file {
my $fn = shift;
open(FN, "<$fn") || die "Cannot read $fn: $!";
#
- # we count lines from 0 ..!!!!
+ # we count lines from 0 ..!!!!?
my $i = -1;
+ my $printline = 0; # but not in error messages
my @lines = <FN>;
chomp(@lines);
$alldata->{'fmtutil'}{$fn}{'lines'} = [ @lines ];
close(FN) || warn("$prg: Cannot close $fn: $!");
for (@lines) {
$i++;
+ $printline++;
chomp;
+ my $orig_line = $_;
next if /^\s*#?\s*$/; # ignore empty and all-blank and just-# lines
next if /^\s*#[^!]/; # ignore whole-line comment that is not a disable
s/#[^!].*//; # remove within-line comment that is not a disable
s/#$//; # remove # at end of line
my ($a,$b,$c,@rest) = split (' '); # special split rule, leading ws ign
+ if (! $b) { # as in: "somefmt"
+ print_warning("no engine specified for format $a, ignoring "
+ . "(file $fn, line $printline)\n");
+ next;
+ }
+ if (! $c) { # as in: "somefmt someeng"
+ print_warning("no pattern argument specified for $a/$b, ignoring line: "
+ . "$orig_line (file $fn, line $printline)\n");
+ next;
+ }
+ if (@rest == 0) { # as in: "somefmt someeng somepat"
+ print_warning("no inifile argument(s) specified for $a/$b, ignoring line: "
+ . "$orig_line (file $fn, line $printline)\n");
+ next;
+ }
my $disabled = 0;
if ($a eq "#!") {
- # we cannot determine whether a line is a proper fmtline or
- # not, so we have to assume that it is
+ # we cannot feasibly determine whether a line is a proper fmtline or
+ # not, so we have to assume that it is as long as we have four args.
my $d = shift @rest;
if (!defined($d)) {
- print_warning("apparently not a real disable line, ignored: $_\n");
+ print_warning("apparently not a real disable line, ignoring: "
+ . "$orig_line (file $fn, line $printline)\n");
next;
} else {
$disabled = 1;
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index ed5b3f0cd35..f0c125b5a68 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -1,12 +1,12 @@
#!/usr/bin/env perl
-# $Id: tlmgr.pl 47951 2018-06-07 05:55:43Z preining $
+# $Id: tlmgr.pl 48030 2018-06-16 13:43:22Z preining $
#
# Copyright 2008-2018 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
-my $svnrev = '$Revision: 47951 $';
-my $datrev = '$Date: 2018-06-07 07:55:43 +0200 (Thu, 07 Jun 2018) $';
+my $svnrev = '$Revision: 48030 $';
+my $datrev = '$Date: 2018-06-16 15:43:22 +0200 (Sat, 16 Jun 2018) $';
my $tlmgrrevision;
my $tlmgrversion;
my $prg;
@@ -215,7 +215,8 @@ my %action_specification = (
"data" => "=s",
"all" => 1,
"list" => 1,
- "only-installed" => 1
+ "only-installed" => 1,
+ "only-remote" => 1
},
"run-post" => 0,
"function" => \&action_info
@@ -1547,6 +1548,10 @@ sub action_dumptlpdb {
# INFO
#
sub action_info {
+ if ($opts{'only-installed'} && $opts{'only-remote'}) {
+ tlwarn("Are you joking? --only-installed and --only-remote cannot both be specified!\n");
+ return($F_ERROR);
+ }
init_local_db();
my ($what,@todo) = @ARGV;
my $ret = $F_OK | $F_NOPOSTACTION;
@@ -1613,8 +1618,10 @@ sub action_info {
} else {
@whattolist = $tlm->list_packages;
}
- # add also the local packages
- TeXLive::TLUtils::push_uniq(\@whattolist, $localtlpdb->list_packages);
+ if (!$opts{'only-remote'}) {
+ # add also the local packages
+ TeXLive::TLUtils::push_uniq(\@whattolist, $localtlpdb->list_packages);
+ }
} else {
@whattolist = ($what, @todo);
}
@@ -1759,19 +1766,23 @@ sub get_available_backups {
my $oldwsloppy = ${^WIN32_SLOPPY_STAT};
${^WIN32_SLOPPY_STAT} = 1;
#
+ my $pkg;
+ my $rev;
+ my $ext;
for my $dirent (@dirents) {
+ $pkg = "";
+ $rev = "";
+ $ext = "";
next if (-d $dirent);
- my $has_accepted_compressiontype = 0;
- for my $comptype (@AcceptedCompressors) {
- my $ext = $CompressorExtension{$comptype};
- $has_accepted_compressiontype = 1 if ($dirent =~ m/\.tar\.$ext$/);
- }
- next if (!$has_accepted_compressiontype);
- if ($dirent !~ m/^(.*)\.r([0-9]+)\.tar\.(.*)$/) {
+ if ($dirent =~ m/^(.*)\.r([0-9]+)\.tar\.$CompressorExtRegexp$/) {
+ $pkg = $1;
+ $rev = $2;
+ $ext = $3;
+ } else {
next;
}
if (!$do_stat) {
- $backups{$1}->{$2} = 1;
+ $backups{$pkg}->{$rev} = 1;
next;
}
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
@@ -1790,9 +1801,9 @@ sub get_available_backups {
if (!$usedt) {
# stat failed, set key to -1 as a sign that there is a backup
# but we cannot stat it
- $backups{$1}->{$2} = -1;
+ $backups{$pkg}->{$rev} = -1;
} else {
- $backups{$1}->{$2} = $usedt;
+ $backups{$pkg}->{$rev} = $usedt;
}
}
# reset the original value of the w32 sloppy mode for stating files
@@ -1805,9 +1816,13 @@ sub restore_one_package {
# first remove the package, then reinstall it
# this way we get rid of useless files
my $restore_file;
- for my $comptype (@AcceptedCompressors) {
- my $ext = $CompressorExtension{$comptype};
- $restore_file = "$bd/${pkg}.r${rev}.tar.$ext" if (-r "$bd/${pkg}.r${rev}.tar.$ext");
+ for my $ext (map {$Compressors{$_}{'extension'}}
+ sort {$Compressors{$a}{'priority'} <=> $Compressors{$a}{'priority'}}
+ keys %Compressors) {
+ if (-r "$bd/${pkg}.r${rev}.tar.$ext") {
+ $restore_file = "$bd/${pkg}.r${rev}.tar.$ext";
+ last;
+ }
}
if (!$restore_file) {
tlwarn("$prg: Cannot find restore file $bd/${pkg}.r${rev}.tar.*, no action taken\n");
@@ -2141,7 +2156,7 @@ sub action_backup {
clear_old_backups ($pkg, $opts{"backupdir"}, $opts{"clean"}, $opts{"dry-run"}, 1);
} else {
# for now default to xz and allow overriding with env var
- my $compressorextension = $CompressorExtension{$::progs{'compressor'}};
+ my $compressorextension = $Compressors{$::progs{'compressor'}}{'extension'};
my $tlp = $localtlpdb->get_package($pkg);
info("saving current status of $pkg to $opts{'backupdir'}/${pkg}.r" .
$tlp->revision . ".tar.$compressorextension\n");
@@ -2268,28 +2283,28 @@ sub write_w32_updater {
tlwarn("$prg: Creation of backup container of $pkg failed.\n");
return 1; # backup failed? abort
}
- my $decompressor = $::progs{$DecompressorProgram{$DefaultCompressorFormat}};
- my $compressorextension = $CompressorExtension{$DefaultCompressorFormat};
- my @decompressorArgs = @{$DecompressorArgs{$DefaultCompressorFormat}};
+ my $decompressor = $::progs{$DefaultCompressorFormat};
+ my $compressorextension = $Compressors{$DefaultCompressorFormat}{'extension'};
+ my @decompressorArgs = @{$Compressors{$DefaultCompressorFormat}{'decompress_args'}};
foreach my $pkg_part (@pkg_parts) {
+ my $dlcontainer = "$temp/$pkg_part.tar.$compressorextension";
if ($media eq 'local_compressed') {
copy("$repo/$pkg_part.tar.$compressorextension", "$temp");
} else { # net
- TeXLive::TLUtils::download_file("$repo/$pkg_part.tar.$compressorextension",
- "$temp/$pkg_part.tar.$compressorextension");
+ TeXLive::TLUtils::download_file("$repo/$pkg_part.tar.$compressorextension", $dlcontainer);
}
# now we should have the file present
- if (!-r "$temp/$pkg_part.tar.$compressorextension") {
+ if (!-r $dlcontainer) {
tlwarn("$prg: Couldn't get $pkg_part.tar.$compressorextension, that is bad\n");
return 1; # abort
}
# unpack xz archive
- my $sysret = system("$decompressor @decompressorArgs < \"$temp/$pkg_part.tar.xz\" > \"$temp/$pkg_part.tar\"");
+ my $sysret = system("$decompressor @decompressorArgs < \"$dlcontainer\" > \"$temp/$pkg_part.tar\"");
if ($sysret) {
tlwarn("$prg: Couldn't unpack $pkg_part.tar.$compressorextension\n");
return 1; # unpack failed? abort
}
- unlink("$temp/$pkg_part.tar.$compressorextension"); # we don't need that archive anymore
+ unlink($dlcontainer); # we don't need that archive anymore
}
}
@@ -3181,7 +3196,7 @@ sub action_update {
}
if ($opts{"backup"} && !$opts{"dry-run"}) {
- my $compressorextension = $CompressorExtension{$::progs{'compressor'}};
+ my $compressorextension = $Compressors{$::progs{'compressor'}}{'extension'};
$tlp->make_container($::progs{'compressor'}, $root,
$opts{"backupdir"}, "${pkg}.r" . $tlp->revision,
$tlp->relocated);
@@ -3930,18 +3945,31 @@ sub show_one_package_csv {
sub show_one_package_list {
my ($p, @rest) = @_;
+ my @out;
+ my $loctlp = $localtlpdb->get_package($p);
+ my $remtlp = $remotetlpdb->get_package($p) unless ($opts{'only-installed'});
+ my $is_installed = (defined($loctlp) ? 1 : 0);
+ my $is_available = (defined($remtlp) ? 1 : 0);
+ if (!($is_installed || $is_available)) {
+ if ($opts{'only-installed'}) {
+ tlwarn("$prg: package $p not locally!\n");
+ } else {
+ tlwarn("$prg: package $p not found neither locally nor remote!\n");
+ }
+ return($F_WARNING);
+ }
+ my $tlp = ($is_installed ? $loctlp : $remtlp);
my $tlm;
if ($opts{"only-installed"}) {
$tlm = $localtlpdb;
} else {
$tlm = $remotetlpdb;
}
- if (defined($localtlpdb->get_package($p))) {
+ if ($is_installed) {
print "i ";
} else {
print " ";
}
- my $tlp = $tlm->get_package($p);
if (!$tlp) {
if ($remotetlpdb->is_virtual) {
# we might have the case that a package is present in a
@@ -7261,10 +7289,9 @@ sub clear_old_backups {
my @dirents = readdir (DIR);
closedir (DIR) || warn "closedir($backupdir) failed: $!";
my @backups;
- my $extre = "(" . join("|", map { $CompressorExtension{$_} } @AcceptedCompressors) . ")";
for my $dirent (@dirents) {
next if (-d $dirent);
- next if ($dirent !~ m/^$pkg\.r([0-9]+)\.tar\.$extre$/);
+ next if ($dirent !~ m/^$pkg\.r([0-9]+)\.tar\.$CompressorExtRegexp$/);
push @backups, [ $1, $dirent ] ;
}
my $i = 1;
@@ -8031,6 +8058,13 @@ dependencies in a similar way.
If this option is given, the installation source will not be used; only
locally installed packages, collections, or schemes are listed.
+=item B<--only-remote>
+
+Only list packages from the remote repository. Useful when checking what
+is available in a remote repository using
+C<tlmgr --repo ... --only-remote info>. Note that
+C<--only-installed> and C<--only-remote> cannot both be specified.
+
=item B<--data C<item1,item2,...>>
If the option C<--data> is given, its argument must be a comma separated
@@ -9695,7 +9729,7 @@ This script and its documentation were written for the TeX Live
distribution (L<http://tug.org/texlive>) and both are licensed under the
GNU General Public License Version 2 or later.
-$Id: tlmgr.pl 47951 2018-06-07 05:55:43Z preining $
+$Id: tlmgr.pl 48030 2018-06-16 13:43:22Z preining $
=cut
# test HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html
diff --git a/Build/source/texk/texlive/w32_wrapper/runscript.tlu b/Build/source/texk/texlive/w32_wrapper/runscript.tlu
index bbc2b7f94ef..da2c1cf5e9f 100755
--- a/Build/source/texk/texlive/w32_wrapper/runscript.tlu
+++ b/Build/source/texk/texlive/w32_wrapper/runscript.tlu
@@ -1,7 +1,7 @@
-local svnrevision = string.match("$Revision: 47648 $", "%d+") or "0"
-local svndate = string.match("$Date: 2018-05-09 09:09:31 +0200 (Wed, 09 May 2018) $", "[-%d]+") or "2009-12-04"
+local svnrevision = string.match("$Revision: 48059 $", "%d+") or "0"
+local svndate = string.match("$Date: 2018-06-20 05:55:23 +0200 (Wed, 20 Jun 2018) $", "[-%d]+") or "2009-12-04"
local bannerstr = "runscript wrapper utility (rev. " ..
svnrevision .. ", " .. svndate .. ")\n" ..
"usage: runscript script-name [arguments]\n" ..
@@ -267,6 +267,9 @@ local docstr = [[
2018/04/06
- introduce a new function is_64bit_windows_os() to
check Windows OS.
+ 2018/06/20
+ - support also scripts in trees other than TEXMFDIST:
+ https://tug.org/pipermail/tex-live/2018-June/041922.html
]]
-- HELPER SUBROUTINES --
@@ -767,8 +770,14 @@ if not ARGV then
os.setenv('TEXMF', TEXMFDIST)
local extlist = '.tlu;.texlua;.pl;.lua;.rb;.py;.tcl;.jar;.vbs;.js;.bat;.cmd;\0'
local progfullname = search_path(progname, BINDIR, '.tlu;.bat;.cmd') or
- assert(find_texmfscript(progname, extlist))
+ find_texmfscript(progname, extlist)
os.setenv('TEXMF', nil)
+ if progfullname == nil then
+-- scripts in $TEXMFLOCAL etc. can't be found without the following
+-- line !!
+ kpse.set_program_name('runscript')
+ progfullname = assert(find_texmfscript(progname, extlist))
+ end
local ext = string.match(string.lower(progfullname), '%.[^\\/.]*$') or ''
if (ext == '.lua') or (ext == '.tlu') or (ext == '.texlua') then -- lua script
arg[0] = progfullname
diff --git a/Master/tlpkg/tlpsrc/lni.tlpsrc b/Master/tlpkg/tlpsrc/lni.tlpsrc
index e69de29bb2d..e69de29bb2d 100755..100644
--- a/Master/tlpkg/tlpsrc/lni.tlpsrc
+++ b/Master/tlpkg/tlpsrc/lni.tlpsrc