From ac8d62d1767ddaee38fb7d8d0afc5ae70233f806 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 1 Apr 2018 22:24:04 +0000 Subject: lwarp (2apr18) git-svn-id: svn://tug.org/texlive/trunk@47225 c570f23f-e606-0410-a88d-b1316a301751 --- .../texk/texlive/linked_scripts/lwarp/lwarpmk.lua | 48 ++-- .../ptex-fontmaps/kanji-config-updmap.pl | 24 +- .../ptex-fontmaps/kanji-fontmap-creator.pl | 4 +- .../texk/texlive/linked_scripts/texlive/tlmgr.pl | 278 ++++++++++++++++++++- 4 files changed, 328 insertions(+), 26 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua index 39ab4a71e61..99b5f4949fe 100755 --- a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua +++ b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua @@ -4,7 +4,7 @@ -- Print the usage of the lwarpmk command: -printversion = "v0.51" +printversion = "v0.52" function printhelp () print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; @@ -95,7 +95,7 @@ function loadconf () -- Default configuration filename: local conffile = "lwarpmk.conf" -- Optional configuration filename: -if arg[2] ~= nil then conffile = arg[2]..".lwarpmkconf" end +if ( arg[2] ~= nil ) then conffile = arg[2]..".lwarpmkconf" end -- Default language: language = "english" -- Default xdyfile: @@ -105,7 +105,9 @@ if (lfs.attributes(conffile,"mode")==nil) then -- file not exists print ("lwarpmk: ===") print ("lwarpmk: " .. conffile .." does not exist.") - print ("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n") + if ( arg[2] ~= nil ) then + print ("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n") + end print ("lwarpmk: ===") printhelp () ; os.exit(1) -- exit the entire lwarpmk script @@ -286,10 +288,9 @@ splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html") end -- Remove auxiliary files: - +-- All aux files are removed since there may be many bbl*.aux files. function removeaux () -os.execute ( rmname .. " " .. - sourcename ..".aux " .. sourcename .. "_html.aux " .. +os.execute ( rmname .. " *.aux " .. sourcename ..".toc " .. sourcename .. "_html.toc " .. sourcename ..".lof " .. sourcename .. "_html.lof " .. sourcename ..".lot " .. sourcename .. "_html.lot " .. @@ -297,7 +298,7 @@ os.execute ( rmname .. " " .. sourcename ..".ind " .. sourcename .. "_html.ind " .. sourcename ..".log " .. sourcename .. "_html.log " .. sourcename ..".gl* " .. sourcename .. "_html.gl* " .. - "*_html_inc.*" + " *_html_inc.* " ) end @@ -332,6 +333,8 @@ if opsystem=="Windows" then os.exit(1) ; end end -- create lwarp_one_limage.cmd +-- Track the number of parallel processes +numimageprocesses = 0 -- Scan lateximages.txt for line in limagesfile:lines() do -- lwimgpage is the page number in the PDF which has the image @@ -340,6 +343,8 @@ for line in limagesfile:lines() do i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|") -- For each entry: if ( (i~=nil) ) then +-- Skip if the page number is 0: +if ( lwimgpage ~= "0" ) then -- Skip is this image is hashed and already exists: local lwimgfullname = "lateximages" .. dirslash .. lwimgname .. ".svg" if ( @@ -361,7 +366,6 @@ end if opsystem=="Unix" then -- For Unix / Linux / Mac OS: err = os.execute( --- print ( cmdgroupopenname .. "pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " .. sourcename .."_html.pdf " .. @@ -380,10 +384,29 @@ rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname .. rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" .. cmdgroupclosename .. " >/dev/null " .. bgname ) +-- Every 32 images, wait for completion at below normal priority, +-- allowing other image tasks to catch up. +numimageprocesses = numimageprocesses + 1 +if ( numimageprocesses > 32 ) then + numimageprocesses = 0 + print ( "lwarpmk: waiting" ) + err = os.execute ( "wait" ) +end elseif opsystem=="Windows" then -- For Windows +-- Every 32 images, wait for completion at below normal priority, +-- allowing other image tasks to catch up. +numimageprocesses = numimageprocesses + 1 +if ( numimageprocesses > 32 ) then + numimageprocesses = 0 + thiswaitcommand = "/WAIT /BELOWNORMAL" + print ( "lwarpmk: waiting" ) +else + thiswaitcommand = "" +end +-- Execute the image generation command err = os.execute ( - "start /b \"\" lwarp_one_limage " .. + "start /B " .. thiswaitcommand .. " \"\" lwarp_one_limage " .. lwimgpage .. " " .. lwimghash .. " " .. lwimgname .. " " .. @@ -397,6 +420,7 @@ if ( err ~= 0 ) then os.exit(1) end end -- not hashed or not exists +end -- not page 0 end -- not nil end -- do io.close(limagesfile) @@ -575,16 +599,12 @@ print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.") print ("lwarpmk: Done.") -- lwarpmk limages: --- Scan the lateximages.txt file to create lateximages, --- then touch the source to trigger a recompile. +-- Scan the lateximages.txt file to create lateximages. elseif arg[1] == "limages" then loadconf () print ("lwarpmk: Processing images.") createlateximages () -print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.") -refreshdate () -print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.") print ("lwarpmk: Done.") -- lwarpmk again: diff --git a/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-config-updmap.pl b/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-config-updmap.pl index a5159f26786..1a0f1f2530a 100755 --- a/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-config-updmap.pl +++ b/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-config-updmap.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl # kanji-config-updmap: setup Japanese font embedding -# Version 20180306.0 +# Version 20180328.0 # # formerly known as updmap-setup-kanji # @@ -22,7 +22,7 @@ use Getopt::Long qw(:config no_autoabbrev ignore_case_always); use strict; my $prg = "kanji-config-updmap"; -my $version = '20180306.0'; +my $version = '20180328.0'; my $updmap_real = "updmap"; my $updmap = $updmap_real; @@ -132,11 +132,29 @@ if ($opt_help) { # my %representatives; my @databaselist = "ptex-fontmaps-data.dat"; -push @databaselist, "ptex-fontmaps-macos-data.dat"; +push @databaselist, "ptex-fontmaps-macos-data.dat" if (macosx_new()); main(@ARGV); +sub macosx { return ($^O=~/^darwin$/i); } + +sub macosx_new { + if (macosx()) { + my $macos_ver = `sw_vers -productVersion`; + my $macos_ver_major = $macos_ver; + $macos_ver_major =~ s/^(\d+)\.(\d+).*/$1/; + my $macos_ver_minor = $macos_ver; + $macos_ver_minor =~ s/^(\d+)\.(\d+).*/$2/; + if ($macos_ver_major==10) { + if ($macos_ver_minor>=11) { + return 1; + } + } + } + return 0; +} + sub version { my $ret = sprintf "%s version %s\n", $prg, $version; return $ret; diff --git a/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-fontmap-creator.pl b/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-fontmap-creator.pl index dc67800d5f2..4631e48c275 100755 --- a/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-fontmap-creator.pl +++ b/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-fontmap-creator.pl @@ -2,7 +2,7 @@ # # kanji-fontmap-creator # (c) 2012-2014 Norbert Preining -# Version: 20180306.0 +# Version: 20180328.0 # Licenced under the GPLv2 or any higher version # # gui to create map files for (kanji-config-)updmap @@ -41,7 +41,7 @@ my $opt_help = 0; my $opt_version = 0; my $prg = "kanji-fontmap-creator"; -my $version = "20180306.0"; +my $version = "20180328.0"; # # global vars configuring operation diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl index 447554c8d5d..585ca0b7c2c 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 47092 2018-03-23 22:22:46Z preining $ +# $Id: tlmgr.pl 47132 2018-03-26 17:19:25Z karl $ # # Copyright 2008-2018 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. -my $svnrev = '$Revision: 47092 $'; -my $datrev = '$Date: 2018-03-23 23:22:46 +0100 (Fri, 23 Mar 2018) $'; +my $svnrev = '$Revision: 47132 $'; +my $datrev = '$Date: 2018-03-26 19:19:25 +0200 (Mon, 26 Mar 2018) $'; my $tlmgrrevision; my $tlmgrversion; my $prg; @@ -1086,7 +1086,7 @@ sub action_remove { # if --all is given, pass on to uninstall_texlive if ($opts{'all'}) { if (@ARGV) { - tlwarn("$prg: No additional arguments allowed with --all\n"); + tlwarn("$prg: No additional arguments allowed with --all: @ARGV\n"); return($F_ERROR); } exit(uninstall_texlive()); @@ -7951,6 +7951,10 @@ C. The C argument requires a key id and removes the requested id from the local keyring. +=head2 list + +Synonym for L. + =head2 option =over 4 @@ -8233,7 +8237,263 @@ package, dependencies are never removed. Options: =item B<--all> -Uninstalls all of TeX Live. +Uninstalls all of TeX Live, asking for confirmation unless C<--force> is +also specified. + +=item B<--backup> + +=item B<--backupdir> I + +These options behave just as with the L action (q.v.), except +they apply to making backups of packages before they are removed. The +default is to make such a backup, that is, to save a copy of packages +before removal. + +See L action for more. + +neither option is given, no backup will be made. If C<--backupdir> is +given and specifies a writable directory then a backup will be made in +that location. If only C<--backup> is given, then a backup will be made +to the directory previously set via the C