texlive[46466] Master/texmf-dist: l3build (27jan18)
commits+karl at tug.org
commits+karl at tug.org
Sat Jan 27 23:10:49 CET 2018
Revision: 46466
http://tug.org/svn/texlive?view=revision&revision=46466
Author: karl
Date: 2018-01-27 23:10:49 +0100 (Sat, 27 Jan 2018)
Log Message:
-----------
l3build (27jan18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/l3build/README.md
trunk/Master/texmf-dist/doc/latex/l3build/l3build.pdf
trunk/Master/texmf-dist/source/latex/l3build/build.lua
trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx
trunk/Master/texmf-dist/tex/latex/l3build/l3build-arguments.lua
trunk/Master/texmf-dist/tex/latex/l3build/l3build-check.lua
trunk/Master/texmf-dist/tex/latex/l3build/l3build-ctan.lua
trunk/Master/texmf-dist/tex/latex/l3build/l3build-file-functions.lua
trunk/Master/texmf-dist/tex/latex/l3build/l3build-help.lua
trunk/Master/texmf-dist/tex/latex/l3build/l3build-install.lua
trunk/Master/texmf-dist/tex/latex/l3build/l3build-stdmain.lua
trunk/Master/texmf-dist/tex/latex/l3build/l3build-typesetting.lua
trunk/Master/texmf-dist/tex/latex/l3build/l3build-variables.lua
trunk/Master/texmf-dist/tex/latex/l3build/l3build.lua
Added Paths:
-----------
trunk/Master/texmf-dist/source/latex/l3build/config-plain.lua
Removed Paths:
-------------
trunk/Master/texmf-dist/source/latex/l3build/plain.lua
Modified: trunk/Master/texmf-dist/doc/latex/l3build/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/l3build/README.md 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/doc/latex/l3build/README.md 2018-01-27 22:10:49 UTC (rev 46466)
@@ -1,7 +1,7 @@
l3build: a testing and building system for LaTeX3
=================================================
-Release 2018/01/10
+Release 2018/01/27
Overview
--------
Modified: trunk/Master/texmf-dist/doc/latex/l3build/l3build.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/l3build/build.lua
===================================================================
--- trunk/Master/texmf-dist/source/latex/l3build/build.lua 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/source/latex/l3build/build.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -7,7 +7,7 @@
bundle = ""
-- Non-standard settings
-checkconfigs = {"build", "plain"}
+checkconfigs = {"build", "config-plain"}
checkdeps = { }
checkengines = {"pdftex", "xetex", "luatex", "ptex", "uptex"}
cleanfiles = {"*.pdf", "*.tex", "*.zip"}
Added: trunk/Master/texmf-dist/source/latex/l3build/config-plain.lua
===================================================================
--- trunk/Master/texmf-dist/source/latex/l3build/config-plain.lua (rev 0)
+++ trunk/Master/texmf-dist/source/latex/l3build/config-plain.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -0,0 +1,2 @@
+checkformat = "tex"
+testfiledir = "testfiles-plain"
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/source/latex/l3build/config-plain.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx 2018-01-27 22:10:49 UTC (rev 46466)
@@ -147,6 +147,7 @@
\luavarset{asciiengines}{\{"pdftex"\}}{Engines which should log as sure ASCII}
\luavarset{checkruns} {1} {Number of runs to complete for a test before comparing the log}
\luavarset{epoch} {1463734800} {Epoch (Unix date) to set for test runs}
+\luavarset{flatten} {true} {Switch to flatten any source structure when sending to CTAN}
\luavarset{maxprintline}{79} {Length of line to use in log files}
\luavarset{packtdszip} {false} {Switch to build a TDS-style zip file for CTAN}
\luavarset{scriptname} {"build.lua"} {Name of script used in dependencies}
@@ -216,7 +217,7 @@
% }^^A
% }
%
-% \date{Released 2018/01/10}
+% \date{Released 2018/01/27}
%
% \maketitle
% \tableofcontents
@@ -319,6 +320,7 @@
% \item \texttt{--engine} (\texttt{-e}) Sets the engine to use for
% testing
% \item \texttt{--epoch} Sets the epoch for typesetting and testing
+% \item \texttt{--first} Name of the first test to run
% \item \texttt{--force} (\texttt{-f}) Force checks to run even if sanity
% checks fail, \emph{e.g.}~when \texttt{--engine} is not given in
% \luavar{checkengines}
@@ -325,6 +327,7 @@
% \item \texttt{--halt-on-error} (\texttt{-H}) Specifies that checks
% should stop as soon as possible, rather than running all requested
% tests; the difference file is printed in the terminal directly in the case of failure
+% \item \texttt{--last} Name of the last test to run
% \item \texttt{--pdf} (\texttt{-p}) Test PDF file against a reference
% version rather than using a log comparison
% \item \texttt{--quiet} (\texttt{-q}) Suppresses output from unpacking
@@ -655,7 +658,7 @@
% using the \var{checkconfigs} table. This is used to list the names of each
% configuration (|.lua| file) which will be used to run tests.
%
-% For example, for the core \LaTeXe{} tests the main test files are contained
+% For example, for the core \LaTeXe{} tests the main test files are contained
% in a directory |testfiles|. To test font loading for \XeTeX{} and \LuaTeX{}
% there are a second set of tests in |testfiles-TU| which use the short
% |build-TU.lua| file shown in Figure~\ref{fig:configs}. To run both sets of
@@ -664,16 +667,16 @@
% first using no additional settings (\emph{i.e.}~reading the normal
% |build.lua| file alone), then running \emph{also} loading the settings from
% |config-TU.lua|.
-% \begin{figure}
-% \begin{lstlisting}[frame=single,language={[5.2]Lua},gobble = 6]
-% -- Special config for these tests
+% \begin{figure}
+% \begin{lstlisting}[frame=single,language={[5.2]Lua},gobble = 6]
+% -- Special config for these tests
% checksearch = true
% checkengines = {"xetex","luatex"}
% testfiledir = "testfiles-TU"
-% \end{lstlisting}
-% \caption{The build script for the \pkg{xparse} module.}
-% \label{fig:configs}
-% \end{figure}
+% \end{lstlisting}
+% \caption{Example of using additional (or overriding) settings for configuring tests in a different subdirectory.}
+% \label{fig:configs}
+% \end{figure}
%
% To allow selection of a one or more configurations, and to allow saving of
% |.tlg| files in non-standard configurations, the |--config| (|-c|) option may
@@ -726,7 +729,9 @@
% files in other locations using the \var{sourcefiledir} and \var{docfiledir}
% variables. For pre-built trees, the glob syntax \texttt{**/*.\meta{ext}} may
% be useful in these cases: this enables recursive searching in the appropriate
-% tree locations.
+% tree locations. With the standard settings, this structure will be removed
+% when creating a CTAN release: the variable \var{flatten} may be
+% used to control this behavior.
%
% A series of example layouts and matching |build.lua| files are available from
% \url{https://github.com/latex3/l3build/tree/master/examples}.
Deleted: trunk/Master/texmf-dist/source/latex/l3build/plain.lua
===================================================================
--- trunk/Master/texmf-dist/source/latex/l3build/plain.lua 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/source/latex/l3build/plain.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -1,2 +0,0 @@
-checkformat = "tex"
-testfiledir = "testfiles-plain"
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/latex/l3build/l3build-arguments.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/l3build/l3build-arguments.lua 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/tex/latex/l3build/l3build-arguments.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -56,6 +56,11 @@
desc = "Sets the epoch for tests and typesetting",
type = "string"
},
+ first =
+ {
+ desc = "Name of first test to run",
+ type = "string"
+ },
force =
{
desc = "Force tests to run if engine is not set up",
@@ -85,6 +90,11 @@
short = "q",
type = "boolean"
},
+ last =
+ {
+ desc = "Name of last test to run",
+ type = "string"
+ },
rerun =
{
desc = "Skip setup: simply rerun tests",
Modified: trunk/Master/texmf-dist/tex/latex/l3build/l3build-check.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/l3build/l3build-check.lua 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/tex/latex/l3build/l3build-check.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -37,6 +37,7 @@
local gsub = string.gsub
local match = string.match
+local insert = table.insert
local sort = table.sort
local utf8_char = unicode.utf8.char
@@ -316,6 +317,8 @@
-- The first time a new font is used, it shows up
-- as being cached
line = gsub(line, "(save cache:", "(load cache:")
+ -- Changes in PDF specials
+ line = gsub(line, "\\pdfliteral origin", "\\pdfliteral")
-- A function to handle the box prefix part
local function boxprefix(s)
return gsub(match(s, "^(%.+)"), "%.", "%%.")
@@ -543,9 +546,7 @@
if not refpdffile then
return
end
- if os_type == "windows" then
- refpdffile = unix_to_win(refpdffile)
- end
+ refpdffile = unix_to_win(refpdffile)
errorlevel = execute(
os_cmpexe .. " " .. refpdffile .. " " .. pdffile .. " > " .. cmpfile
)
@@ -564,9 +565,6 @@
if not tlgfile then
return
end
- if os_type == "windows" then
- tlgfile = unix_to_win(tlgfile)
- end
-- Do additional log formatting if the engine is LuaTeX, there is no
-- LuaTeX-specific .tlg file and the default engine is not LuaTeX
if engine == "luatex"
@@ -575,9 +573,6 @@
and stdengine ~= "luajittex"
then
local luatlgfile = testdir .. "/" .. name .. ".luatex" .. tlgext
- if os_type == "windows" then
- luatlgfile = unix_to_win(luatlgfile)
- end
formatlualog(tlgfile, luatlgfile)
formatlualog(logfile, logfile)
-- This allows code sharing below: we only need the .tlg name in one place
@@ -584,7 +579,10 @@
tlgfile = luatlgfile
end
errorlevel = execute(
- os_diffexe .. " " .. tlgfile .. " " .. logfile .. " > " .. difffile
+ os_diffexe .. " "
+ .. unix_to_win(tlgfile) .. " "
+ .. unix_to_win(logfile) .. " > "
+ .. unix_to_win(difffile)
)
if errorlevel == 0 then
os.remove(difffile)
@@ -717,7 +715,7 @@
-- No names passed: find all test files
if not next(names) then
for _,i in pairs(filelist(testfiledir, "*" .. lvtext)) do
- table.insert(names, jobname(i))
+ insert(names, jobname(i))
end
for _,i in ipairs(filelist(unpackdir, "*" .. lvtext)) do
if fileexists(testfiledir .. "/" .. i) then
@@ -724,10 +722,36 @@
print("Duplicate test file: " .. i)
return 1
else
- table.insert(names, jobname(i))
+ insert(names, jobname(i))
end
end
sort(names)
+ -- Deal limiting range of names
+ if options["first"] then
+ local allnames = names
+ local active = false
+ local firstname = options["first"]
+ names = { }
+ for _,name in ipairs(allnames) do
+ if name == firstname then
+ active = true
+ end
+ if active then
+ insert(names,name)
+ end
+ end
+ end
+ if options["last"] then
+ local allnames = names
+ local lastname = options["last"]
+ names = { }
+ for _,name in ipairs(allnames) do
+ insert(names,name)
+ if name == lastname then
+ break
+ end
+ end
+ end
end
-- https://stackoverflow.com/a/32167188
local function shuffle(tbl)
Modified: trunk/Master/texmf-dist/tex/latex/l3build/l3build-ctan.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/l3build/l3build-ctan.lua 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/tex/latex/l3build/l3build-ctan.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -27,34 +27,27 @@
-- Copy files to the main CTAN release directory
function copyctan()
- local ctantarget = ctanpkg
- if docfiledir ~= currentdir then
- ctantarget = ctanpkg .. "/" .. gsub(docfiledir, "^%.*/", "")
- end
- mkdir(ctandir .. "/" .. ctantarget)
- for _,filetype in pairs(
- {
- bibfiles,
- demofiles,
- docfiles,
- pdffiles,
- typesetlist
- }
- ) do
- for _,file in pairs(filetype) do
- cp(file, docfiledir, ctandir .. "/" .. ctantarget)
+ mkdir(ctandir .. "/" .. ctanpkg)
+ local function copyfiles(files,source)
+ if source == currentdir or flatten then
+ for _,filetype in pairs(files) do
+ cp(filetype,source,ctandir .. "/" .. ctanpkg)
+ end
+ else
+ for _,filetype in pairs(files) do
+ for _,file in pairs(tree(source,filetype)) do
+ local path,file = splitpath(file)
+ local ctantarget = ctandir .. "/" .. ctanpkg .. "/" .. path
+ mkdir(ctantarget)
+ cp(file,source,ctantarget)
+ end
+ end
end
end
- ctantarget = ctanpkg
- if sourcefiledir ~= currentdir then
- ctantarget = ctanpkg .. "/" .. gsub(sourcefiledir, "^%.*/", "")
+ for _,tab in pairs({bibfiles,demofiles,docfiles,pdffiles,typesetlist}) do
+ copyfiles(tab,docfiledir)
end
- mkdir(ctandir .. "/" .. ctantarget)
- for _,file in pairs(sourcefiles) do
- if sourcedir ~= currentdir then
- end
- cp(file, sourcefiledir, ctandir .. "/" .. ctantarget)
- end
+ copyfiles(sourcefiles,sourcefiledir)
for _,file in pairs(textfiles) do
cp(file, currentdir, ctandir .. "/" .. ctanpkg)
end
Modified: trunk/Master/texmf-dist/tex/latex/l3build/l3build-file-functions.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/l3build/l3build-file-functions.lua 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/tex/latex/l3build/l3build-file-functions.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -364,7 +364,11 @@
-- Deal with the fact that Windows and Unix use different path separators
function unix_to_win(path)
- return gsub(path, "/", "\\")
+ if os_type == "windows" then
+ return gsub(path, "/", "\\")
+ else
+ return path
+ end
end
Modified: trunk/Master/texmf-dist/tex/latex/l3build/l3build-help.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/l3build/l3build-help.lua 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/tex/latex/l3build/l3build-help.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -47,6 +47,7 @@
print(" save Saves test validation log")
end
print(" setversion Update version information in sources")
+ print(" uninstall Uninstalls files from the local texmf tree")
print(" unpack Unpacks the source files into the build tree")
print("")
print("Valid options are:")
Modified: trunk/Master/texmf-dist/tex/latex/l3build/l3build-install.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/l3build/l3build-install.lua 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/tex/latex/l3build/l3build-install.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -22,7 +22,37 @@
--]]
+local pairs = pairs
+local print = print
+local set_program = kpse.set_program_name
+local var_value = kpse.var_value
+
+local function gethome()
+ set_program("latex")
+ return options["texmfhome"] or var_value("TEXMFHOME")
+end
+
+function uninstall()
+ local installdir = gethome() .. "/tex/" .. moduledir
+ if options["dry-run"] then
+ print("\n" .. "Installation root: " .. installdir)
+ local files = filelist(installdir)
+ -- Deal with an empty directory
+ if next(files) then
+ print("\n" .. "Files for removal:")
+ for _,file in pairs(filelist(installdir)) do
+ print("- " .. file)
+ end
+ else
+ print("No files present")
+ end
+ return 0
+ else
+ return rmdir(installdir)
+ end
+end
+
-- Locally install files: only deals with those extracted, not docs etc.
function install()
local errorlevel = unpack()
@@ -29,24 +59,23 @@
if errorlevel ~= 0 then
return errorlevel
end
- kpse.set_program_name("latex")
- local texmfhome = options["texmfhome"] or kpse.var_value("TEXMFHOME")
- local installdir = texmfhome .. "/tex/" .. moduledir
+ local installdir = gethome() .. "/tex/" .. moduledir
if options["dry-run"] then
print("\n" .. "Installation root: " .. installdir
- .. "\n" .. "Intallation files:"
+ .. "\n" .. "Installation files:"
)
- for _,filetype in ipairs(installfiles) do
+ for _,filetype in pairs(installfiles) do
for _,file in pairs(filelist(unpackdir,filetype)) do
print("- " .. file)
end
end
+ return 0
else
errorlevel = cleandir(installdir)
if errorlevel ~= 0 then
return errorlevel
end
- for _,filetype in ipairs(installfiles) do
+ for _,filetype in pairs(installfiles) do
errorlevel = cp(filetype, unpackdir, installdir)
if errorlevel ~= 0 then
return errorlevel
Modified: trunk/Master/texmf-dist/tex/latex/l3build/l3build-stdmain.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/l3build/l3build-stdmain.lua 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/tex/latex/l3build/l3build-stdmain.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -72,6 +72,8 @@
if errorlevel == 0 then
errorlevel = setversion()
end
+ elseif target == "uninstall" then
+ errorlevel = call(modules, "uninstall")
elseif target == "unpack" then
errorlevel = call(modules, "bundleunpack")
elseif target == "version" then
@@ -107,6 +109,8 @@
end
elseif target == "setversion" then
errorlevel = setversion()
+ elseif target == "uninstall" then
+ errorlevel = uninstall()
elseif target == "unpack" then
errorlevel = unpack()
elseif target == "version" then
Modified: trunk/Master/texmf-dist/tex/latex/l3build/l3build-typesetting.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/l3build/l3build-typesetting.lua 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/tex/latex/l3build/l3build-typesetting.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -117,12 +117,14 @@
function makeindex(name, dir, inext, outext, logext, style)
if fileexists(typesetdir .. "/" .. name .. inext) then
local path, name = splitpath(name)
+ if style == "" then style = nil end
return(
runtool(
path, dir,
"INDEXSTYLE",
- makeindexexe .. " " .. makeindexopts .. " "
- .. " -s " .. style .. " -o " .. name .. outext
+ makeindexexe .. " " .. makeindexopts
+ .. " -o " .. name .. outext
+ .. (style and (" -s " .. style) or "")
.. " -t " .. name .. " " .. name .. inext
)
)
Modified: trunk/Master/texmf-dist/tex/latex/l3build/l3build-variables.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/l3build/l3build-variables.lua 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/tex/latex/l3build/l3build-variables.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -177,6 +177,9 @@
asciiengines = asciiengines or {"pdftex"}
checkruns = checkruns or 1
epoch = epoch or 1463734800
+if flatten == nil then
+ flatten = true
+end
maxprintline = maxprintline or 79
packtdszip = packtdszip or false
scriptname = scriptname or "build.lua"
Modified: trunk/Master/texmf-dist/tex/latex/l3build/l3build.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/l3build/l3build.lua 2018-01-27 22:08:58 UTC (rev 46465)
+++ trunk/Master/texmf-dist/tex/latex/l3build/l3build.lua 2018-01-27 22:10:49 UTC (rev 46466)
@@ -23,7 +23,7 @@
--]]
-- Version information
-release_date = "2018/01/10"
+release_date = "2018/01/27"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
More information about the tex-live-commits
mailing list