From 2cf53968f130744e9fe88bef59c11d80218cbb45 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 15 May 2020 03:02:03 +0000 Subject: CTAN sync 202005150302 --- systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm | 6 +++--- systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm | 29 ++++++++++++++++++-------- 2 files changed, 23 insertions(+), 12 deletions(-) (limited to 'systems/texlive/tlnet/tlpkg/TeXLive') diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm index ea32785efd..c299c8c2dd 100644 --- a/systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm +++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm @@ -1,4 +1,4 @@ -# $Id: TLPDB.pm 54993 2020-05-03 21:57:54Z karl $ +# $Id: TLPDB.pm 55126 2020-05-13 17:27:10Z karl $ # TeXLive::TLPDB.pm - tlpdb plain text database files. # Copyright 2007-2020 Norbert Preining # This file is licensed under the GNU General Public License version 2 @@ -6,7 +6,7 @@ package TeXLive::TLPDB; -my $svnrev = '$Revision: 54993 $'; +my $svnrev = '$Revision: 55126 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -1972,7 +1972,7 @@ sub _install_data { } my $ww = ($whatsize || ""); my $ss = ($whatcheck || ""); - debug("tlpdb:_install_data: what=$what, target=$target, size=$ww, checksum=$ss, tmpdir=$tempdir\n"); + debug("TLPDB::_install_data: what=$what, target=$target, size=$ww, checksum=$ss, tmpdir=$tempdir\n"); my ($ret, $pkg) = TeXLive::TLUtils::unpack($what, $target, 'size' => $whatsize, 'checksum' => $whatcheck, 'tmpdir' => $tempdir); if (!$ret) { tlwarn("TLPDB::_install_data: $pkg for $what\n"); # $pkg is error msg diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm index 5cf0ccc29f..1d5d2c02b1 100644 --- a/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm +++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm @@ -1,4 +1,4 @@ -# $Id: TLUtils.pm 54993 2020-05-03 21:57:54Z karl $ +# $Id: TLUtils.pm 55126 2020-05-13 17:27:10Z karl $ # TeXLive::TLUtils.pm - the inevitable utilities for TeX Live. # Copyright 2007-2020 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: 54993 $'; +my $svnrev = '$Revision: 55126 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -551,7 +551,7 @@ and thus honors various env variables like C, C, and C. sub initialize_global_tmpdir { $::tl_tmpdir = File::Temp::tempdir(CLEANUP => 1); - ddebug("initialize_global_tmpdir: creating global tempdir $::tl_tmpdir\n"); + ddebug("TLUtils::initialize_global_tmpdir: creating global tempdir $::tl_tmpdir\n"); return ($::tl_tmpdir); } @@ -565,7 +565,7 @@ is terminated. sub tl_tmpdir { initialize_global_tmpdir() if (!defined($::tl_tmpdir)); my $tmp = File::Temp::tempdir(DIR => $::tl_tmpdir, CLEANUP => 1); - ddebug("tl_tmpdir: creating tempdir $tmp\n"); + ddebug("TLUtils::tl_tmpdir: creating tempdir $tmp\n"); return ($tmp); } @@ -580,7 +580,7 @@ Arguments are passed on to C. sub tl_tmpfile { initialize_global_tmpdir() if (!defined($::tl_tmpdir)); my ($fh, $fn) = File::Temp::tempfile(@_, DIR => $::tl_tmpdir, UNLINK => 1); - ddebug("tl_tempfile: creating tempfile $fn\n"); + ddebug("TLUtils::tl_tempfile: creating tempfile $fn\n"); return ($fh, $fn); } @@ -1510,6 +1510,10 @@ sub install_packages { my $totalsize = 0; my $donesize = 0; my %tlpsizes; + debug("TLUtils::install_packages: fromtlpdb.root=$root, media=$media," + . " totlpdb.root=" . $totlpdb->root + . " what=$what ($totalnr), opt_src=$opt_src, opt_doc=$opt_doc\n"); + foreach my $p (@packs) { $tlpobjs{$p} = $fromtlpdb->get_package($p); if (!defined($tlpobjs{$p})) { @@ -1549,10 +1553,17 @@ sub install_packages { &$h($n,$totalnr); } # push $package to @packs_again if download failed + # (and not installing from disk). if (!$fromtlpdb->install_package($package, $totlpdb)) { - tlwarn("TLUtils::install_packages: Failed to install $package\n" - ."Will be retried later.\n"); - push @packs_again, $package; + tlwarn("TLUtils::install_packages: Failed to install $package\n"); + if ($media eq "NET") { + tlwarn(" $package will be retried later.\n"); + push @packs_again, $package; + } else { + # return false as soon as one package failed, since we won't + # be trying again. + return 0; + } } else { $donesize += $tlpsizes{$package}; } @@ -1988,7 +1999,7 @@ sub add_link_dir_dir { return 0; } if (-w $to) { - debug ("linking files from $from to $to\n"); + debug ("TLUtils::add_link_dir_dir: linking from $from to $to\n"); chomp (@files = `ls "$from"`); my $ret = 1; for my $f (@files) { -- cgit v1.2.3