diff options
author | Karl Berry <karl@freefriends.org> | 2018-04-03 21:38:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-04-03 21:38:18 +0000 |
commit | 3fb0ad9f253c3ebf81ce763d3f6ddb3f9d9f4191 (patch) | |
tree | 41cb948bdec6398d9a899bde276f561b42364f25 /Build/source | |
parent | 10bc59082551160a5434cb4c7fcfdc7816bb647d (diff) |
context (3apr18)
git-svn-id: svn://tug.org/texlive/trunk@47272 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun | 167 | ||||
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl | 396 |
2 files changed, 195 insertions, 368 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun b/Build/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun index 3374a364a18..91528360a81 100755 --- a/Build/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun +++ b/Build/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun @@ -195,7 +195,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-macro"] = package.loaded["l-macro"] or true --- original size: 6393, stripped down to: 3659 +-- original size: 8260, stripped down to: 5213 if not modules then modules={} end modules ['l-macros']={ version=1.001, @@ -207,7 +207,8 @@ if not modules then modules={} end modules ['l-macros']={ local S,P,R,V,C,Cs,Cc,Ct,Carg=lpeg.S,lpeg.P,lpeg.R,lpeg.V,lpeg.C,lpeg.Cs,lpeg.Cc,lpeg.Ct,lpeg.Carg local lpegmatch=lpeg.match local concat=table.concat -local next=next +local format,sub=string.format,string.sub +local next,load,type=next,load,type local newline=S("\n\r")^1 local continue=P("\\")*newline local spaces=S(" \t")+continue @@ -228,6 +229,14 @@ local patterns={} local definitions={} local resolve local subparser +local report_lua=function(...) + if logs and logs.reporter then + report_lua=logs.reporter("system","lua") + report_lua(...) + else + print(format(...)) + end +end resolve=C(C(name)*arguments^-1)/function(raw,s,a) local d=definitions[s] if d then @@ -334,6 +343,61 @@ end function macros.resolving() return next(patterns) end +local function loaded(name,trace,detail) + local f=io.open(name,"rb") + if not f then + return false,format("file '%s' not found",name) + end + local c=f:read("*a") + if not c then + return false,format("file '%s' is invalid",name) + end + f:close() + local n=lpegmatch(parser,c) + if trace then + if #n~=#c then + report_lua("macros expanded in '%s' (%i => %i bytes)",name,#c,#n) + if detail then + report_lua() + report_lua(n) + report_lua() + end + elseif detail then + report_lua("no macros expanded in '%s'",name) + end + end + if #name>30 then + n="--[["..sub(name,-30).."]] "..n + else + n="--[["..name.."]] "..n + end + return load(n) +end +macros.loaded=loaded +function required(name,trace) + local filename=file.addsuffix(name,"lua") + local fullname=resolvers and resolvers.find_file(filename) or filename + if not fullname or fullname=="" then + return false + end + local codeblob=package.loaded[fullname] + if codeblob then + return codeblob + end + local code,message=loaded(fullname,macros,trace,trace) + if type(code)=="function" then + code=code() + else + report_lua("error when loading '%s'",fullname) + return false,message + end + if code==nil then + code=false + end + package.loaded[fullname]=code + return code +end +macros.required=required end -- of closure @@ -609,7 +673,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-package"] = package.loaded["l-package"] or true --- original size: 11564, stripped down to: 8625 +-- original size: 11562, stripped down to: 8625 if not modules then modules={} end modules ['l-package']={ version=1.001, @@ -620,10 +684,10 @@ if not modules then modules={} end modules ['l-package']={ } local type=type local gsub,format,find=string.gsub,string.format,string.find +local insert,remove=table.insert,table.remove local P,S,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.Cs,lpeg.match local package=package local searchers=package.searchers or package.loaders -local insert,remove=table.insert,table.remove local filejoin=file and file.join or function(path,name) return path.."/"..name end local isreadable=file and file.is_readable or function(name) local f=io.open(name) if f then f:close() return true end end local addsuffix=file and file.addsuffix or function(name,suffix) return name.."."..suffix end @@ -1871,7 +1935,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-table"] = package.loaded["l-table"] or true --- original size: 40161, stripped down to: 23559 +-- original size: 40197, stripped down to: 23561 if not modules then modules={} end modules ['l-table']={ version=1.001, @@ -2783,10 +2847,10 @@ function table.reversed(t) return tt end end -function table.reverse(t) +function table.reverse(t) if t then local n=#t - for i=1,floor(n/2) do + for i=1,floor(n/2) do local j=n-i+1 t[i],t[j]=t[j],t[i] end @@ -6037,7 +6101,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-str"] = package.loaded["util-str"] or true --- original size: 38725, stripped down to: 21726 +-- original size: 38699, stripped down to: 22142 if not modules then modules={} end modules ['util-str']={ version=1.001, @@ -6051,13 +6115,15 @@ utilities.strings=utilities.strings or {} local strings=utilities.strings local format,gsub,rep,sub,find=string.format,string.gsub,string.rep,string.sub,string.find local load,dump=load,string.dump -local tonumber,type,tostring,next=tonumber,type,tostring,next +local tonumber,type,tostring,next,setmetatable=tonumber,type,tostring,next,setmetatable +local unpack,concat=table.unpack,table.concat local unpack,concat=table.unpack,table.concat local P,V,C,S,R,Ct,Cs,Cp,Carg,Cc=lpeg.P,lpeg.V,lpeg.C,lpeg.S,lpeg.R,lpeg.Ct,lpeg.Cs,lpeg.Cp,lpeg.Carg,lpeg.Cc local patterns,lpegmatch=lpeg.patterns,lpeg.match local utfchar,utfbyte,utflen=utf.char,utf.byte,utf.len local loadstripped=nil -if LUAVERSION<5.2 then +local oldfashioned=LUAVERSION<5.2 +if oldfashioned then loadstripped=function(str,shortcuts) return load(str) end @@ -6329,7 +6395,7 @@ local template=[[ return function(%s) return %s end ]] local preamble,environment="",{} -if LUAVERSION<5.2 then +if oldfashioned then preamble=[[ local lpeg=lpeg local type=type @@ -6376,7 +6442,7 @@ else sequenced=table.sequenced, formattednumber=number.formatted, sparseexponent=number.sparseexponent, - formattedfloat=number.formattedfloat + formattedfloat=number.formattedfloat, } end local arguments={ "a1" } @@ -6733,12 +6799,18 @@ local builder=Cs { "start", ["?"]=Cs(((1-P("%"))^1 )^1)/format_rest, ["!"]=Carg(2)*prefix_any*P("!")*C((1-P("!"))^1)*P("!")/format_extension, } -local direct=Cs ( - P("%")*(S("+- .")+R("09"))^0*S("sqidfgGeExXo")*P(-1)/[[local format = string.format return function(str) return format("%0",str) end]] -) +local xx=setmetatable({},{ __index=function(t,k) local v=format("%02x",k) t[k]=v return v end }) +local XX=setmetatable({},{ __index=function(t,k) local v=format("%02X",k) t[k]=v return v end }) +local preset={ + ["%02x"]=function(n) return xx[n] end, + ["%02X"]=function(n) return XX[n] end, +} +local direct=P("%")*(S("+- .")+R("09"))^0*S("sqidfgGeExXo")*P(-1)/[[local format = string.format return function(str) return format("%0",str) end]] local function make(t,str) - local f - local p + local f=preset[str] + if f then + return f + end local p=lpegmatch(direct,str) if p then f=loadstripped(p)() @@ -6759,7 +6831,7 @@ local function use(t,fmt,...) return t[fmt](...) end strings.formatters={} -if LUAVERSION<5.2 then +if oldfashioned then function strings.formatters.new(noconcat) local t={ _type_="formatter",_connector_=noconcat and "," or "..",_extensions_={},_preamble_=preamble,_environment_={} } setmetatable(t,{ __index=make,__call=use }) @@ -6796,7 +6868,7 @@ patterns.xmlescape=Cs((P("<")/"<"+P(">")/">"+P("&")/"&"+P('"')/"" patterns.texescape=Cs((C(S("#$%\\{}"))/"\\%1"+P(1))^0) patterns.luaescape=Cs(((1-S('"\n'))^1+P('"')/'\\"'+P('\n')/'\\n"')^0) patterns.luaquoted=Cs(Cc('"')*((1-S('"\n'))^1+P('"')/'\\"'+P('\n')/'\\n"')^0*Cc('"')) -if LUAVERSION<5.2 then +if oldfashioned then add(formatters,"xml",[[lpegmatch(xmlescape,%s)]],"local xmlescape = lpeg.patterns.xmlescape") add(formatters,"tex",[[lpegmatch(texescape,%s)]],"local texescape = lpeg.patterns.texescape") add(formatters,"lua",[[lpegmatch(luaescape,%s)]],"local luaescape = lpeg.patterns.luaescape") @@ -9200,7 +9272,7 @@ do -- create closure to overcome 200 locals limit package.loaded["trac-log"] = package.loaded["trac-log"] or true --- original size: 32737, stripped down to: 22946 +-- original size: 32922, stripped down to: 23011 if not modules then modules={} end modules ['trac-log']={ version=1.001, @@ -9210,13 +9282,15 @@ if not modules then modules={} end modules ['trac-log']={ license="see context related readme files" } local next,type,select,print=next,type,select,print -local write_nl,write=texio and texio.write_nl or print,texio and texio.write or io.write local format,gmatch,find=string.format,string.gmatch,string.find local concat,insert,remove=table.concat,table.insert,table.remove local topattern=string.topattern local utfchar=utf.char local datetime=os.date local openfile=io.open +local runningtex=tex and (tex.jobname or tex.formatname) +local write_nl=runningtex and texio and texio.write_nl or print +local write=runningtex and texio and texio.write or io.write local setmetatableindex=table.setmetatableindex local formatters=string.formatters local settings_to_hash=utilities.parsers.settings_to_hash @@ -9243,7 +9317,7 @@ local function ignore() end setmetatableindex(logs,function(t,k) t[k]=ignore;return ignore end) local report,subreport,status,settarget,setformats,settranslations local direct,subdirect,writer,pushtarget,poptarget,setlogfile,settimedlog,setprocessor,setformatters,newline -if tex and (tex.jobname or tex.formatname) then +if runningtex then if texio.setescape then texio.setescape(0) end @@ -10091,7 +10165,7 @@ do -- create closure to overcome 200 locals limit package.loaded["trac-inf"] = package.loaded["trac-inf"] or true --- original size: 8284, stripped down to: 5698 +-- original size: 8097, stripped down to: 5534 if not modules then modules={} end modules ['trac-inf']={ version=1.001, @@ -10205,10 +10279,7 @@ function statistics.show() register("control sequences",function() return format("%s of %s + %s",status.cs_count,status.hash_size,status.hash_extra) end) - register("callbacks",function() - local total,indirect=status.callbacks or 0,status.indirect_callbacks or 0 - return format("%s direct, %s indirect, %s total",total-indirect,indirect,total) - end) + register("callbacks",statistics.callbacks) if TEXENGINE=="luajittex" and JITSUPPORTED then local jitstatus=jit.status if jitstatus then @@ -10427,7 +10498,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-lua"] = package.loaded["util-lua"] or true --- original size: 6921, stripped down to: 4998 +-- original size: 6621, stripped down to: 4764 if not modules then modules={} end modules ['util-lua']={ version=1.001, @@ -10463,7 +10534,7 @@ luautilities.suffixes={ tua="tua", tuc="tuc", } -local function register(name) +local function register(name) if tracestripping then report_lua("stripped bytecode from %a",name or "unknown") end @@ -10491,17 +10562,12 @@ local function stupidcompile(luafile,lucfile,strip) end function luautilities.loadedluacode(fullname,forcestrip,name,macros) name=name or fullname - local code,message if macros then macros=lua.macros end - if macros and macros.enabled then - local f=io.open(fullname,"rb") local c=f:read("*a") f:close() - local n=c and macros.resolvestring("--[["..fullname.."]] "..c) - if n and #n~=#c then - report_lua("preprocessed file %a: %i => %i bytes",fullname,#c,#n) - end - code,message=load(n or c) + local code,message + if macros then + code,message=macros.loaded(fullname,true,false) else code,message=loadfile(fullname) end @@ -15602,7 +15668,7 @@ do -- create closure to overcome 200 locals limit package.loaded["lxml-xml"] = package.loaded["lxml-xml"] or true --- original size: 10412, stripped down to: 7669 +-- original size: 11096, stripped down to: 8243 if not modules then modules={} end modules ['lxml-xml']={ version=1.001, @@ -15621,6 +15687,9 @@ local xmltostring=xml.tostring local xmlserialize=xml.serialize local xmlcollected=xml.collected local xmlnewhandlers=xml.newhandlers +local reparsedentity=xml.reparsedentitylpeg +local unescapedentity=xml.unescapedentitylpeg +local parsedentity=reparsedentity local function first(collected) return collected and collected[1] end @@ -15903,6 +15972,24 @@ function xml.text(id,pattern) return "" end end +function xml.pure(id,pattern) + if pattern then + local collected=xmlfilter(id,pattern) + if collected and #collected>0 then + parsedentity=unescapedentity + local s=collected and #collected>0 and xmltotext(collected[1]) or "" + parsedentity=reparsedentity + return s + else + return "" + end + else + parsedentity=unescapedentity + local s=xmltotext(id) or "" + parsedentity=reparsedentity + return s + end +end xml.content=text function xml.position(id,pattern,n) return position(xmlfilter(id,pattern),n) @@ -21234,8 +21321,8 @@ end -- of closure -- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 874849 --- stripped bytes : 317531 +-- original bytes : 877106 +-- stripped bytes : 317575 -- end library merge diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl index 2391d944319..043868bc0f5 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 47220 2018-04-01 03:20:33Z preining $ +# $Id: tlmgr.pl 47254 2018-04-02 23:13:43Z 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: 47220 $'; -my $datrev = '$Date: 2018-04-01 05:20:33 +0200 (Sun, 01 Apr 2018) $'; +my $svnrev = '$Revision: 47254 $'; +my $datrev = '$Date: 2018-04-03 01:13:43 +0200 (Tue, 03 Apr 2018) $'; my $tlmgrrevision; my $tlmgrversion; my $prg; @@ -488,15 +488,18 @@ sub main { tldie("$prg: unknown value for --verify-repo: $opts{'verify-repo'}\n"); } # convert command line crypto options - $opts{"verify-repo"} = convert_crypto_options($opts{"verify-downloads"}, $opts{"require-verification"}, $opts{"verify-repo"}); - if (defined($opts{"verify-downloads"}) || defined($opts{"require-verification"})) { + $opts{"verify-repo"} + = convert_crypto_options($opts{"verify-downloads"}, + $opts{"require-verification"}, + $opts{"verify-repo"}); + if (defined($opts{"verify-downloads"}) + || defined($opts{"require-verification"})) { tlwarn("$prg: please use -verify-repo options instead of verify-downloads/require-verification\n" . - "$prg: adjusting --verify-repo=$opts{'verify-repo'}\n"); + "$prg: adjusting to --verify-repo=$opts{'verify-repo'}\n"); } delete $opts{"require-verification"}; delete $opts{"verify-downloads"}; - # now $action should be part of %actionoptions, otherwise this is # an error if (defined($action) && $action && !exists $action_specification{$action}) { @@ -6568,7 +6571,7 @@ sub handle_gpg_config_settings { # it was requested via the default setting, so just debug it # the list of repositories will contain verified/not verified statements debug ("$prefix, verification implicitly requested, " - . "continuing without verification\n"); + . "continuing without verification\n"); } } else { # we do not setup gpg: when explicitly requested, be silent, otherwise info @@ -6586,7 +6589,6 @@ sub handle_gpg_config_settings { } } - # initialize the global $remotetlpdb object, or die. # uses the global $location. # @@ -7002,8 +7004,8 @@ sub load_config_file { $config{"auto-remove"} = 1; $config{"persistent-downloads"} = 1; $config{"verify-repo"} = "main"; - # do NOT set this here, we distinguish between explicitly set in the config file - # or implicitly true + # do NOT set this here, we distinguish between explicitly set in the + # config file or implicitly true: # $config{"verify-downloads"} = 1; # loads system config file, this cannot be changes with tlmgr @@ -7018,7 +7020,10 @@ sub load_config_file { $tlmgr_config_file = TeXLive::TLConfFile->new($fn, "#", "="); load_options_from_config($tlmgr_config_file) if $tlmgr_config_file; - $config{"verify-repo"} = convert_crypto_options($config{"verify-downloads"}, $config{"require-verification"}, $config{"verify-repo"}); + $config{"verify-repo"} + = convert_crypto_options($config{"verify-downloads"}, + $config{"require-verification"}, + $config{"verify-repo"}); delete $config{"require-verification"}; delete $config{"verify-downloads"}; @@ -7160,8 +7165,8 @@ sub convert_crypto_options { if ((defined($verify_downloads) || defined($require_verification)) && defined($verify_repo)) { # we cannot have all three, warn and bail out - tldie("$prg: The options verify-downloads and require-verification have been\n" . - "$prg: superseeded by verify-repo, please use only the later on!\n"); + tldie("$prg: The options verify-downloads and require-verification have\n" + . "$prg: been superseded by verify-repo, please use only the latter!\n"); } # return immediately if verify_repo is already set return($verify_repo) if (defined($verify_repo)); @@ -7181,7 +7186,8 @@ sub convert_crypto_options { # explicit --no-verify-downloads was given if ($require_verification) { # --require-verification was given - tldie("You cannot ask for no verification and require it at the same time!\n"); + tldie("You cannot ask for --no-verify-downloads and" + . " --require-verification at the same time!\n"); } else { $ret = "none"; } @@ -7192,7 +7198,7 @@ sub convert_crypto_options { if ($require_verification) { $ret = "all"; } else { - # dont set anything, as nothing has been passed in + # don't set anything, as nothing has been passed in } } return($ret); @@ -7481,7 +7487,7 @@ what remains to be done. Instead of the normal output intended for human consumption, write (to standard output) a fixed format more suitable for machine parsing. See -the L</MACHINE-READABLE OUTPUT> section below. +the L<MACHINE-READABLE OUTPUT> section below. =item B<--no-execute-actions> @@ -7530,12 +7536,12 @@ Uses I<dir> for the tree in user mode; see L<USER MODE> below. =item B<--verify-repo=[none|main|all]> -Defines the level of verification done: If C<none> is passed, no -verification whatsoever is done. If C<main> and a working GnuPG (C<gpg>) -binary is available, all repositories are checked, but only the main -repository is required to be signed. If C<all> then all repositories -need to be signed. -See L<CRYPTOGRAPHIC VERIFICATION> below for details. +Defines the level of verification done: If C<none> is specified, no +verification whatsoever is done. If C<main> is given and a working GnuPG +(C<gpg>) binary is available, all repositories are checked, but only the +main repository is required to be signed. If C<all> is given, then all +repositories need to be signed. See L<CRYPTOGRAPHIC VERIFICATION> below +for details. =back @@ -7618,7 +7624,7 @@ performed are written to the terminal. =item B<candidates I<pkg>> Shows the available candidate repositories for package I<pkg>. -See L</MULTIPLE REPOSITORIES> below. +See L<MULTIPLE REPOSITORIES> below. =back @@ -8030,7 +8036,7 @@ from the local keyring. =head2 list -Synonym for L<info>. +Synonym for L<info|/info [I<option>...] [collections|schemes|I<pkg>...]>. =head2 option @@ -8199,7 +8205,7 @@ is changed, while if the setting I<w32_multi_user> is on, a warning is issued that the caller does not have enough privileges. If the user does not have admin rights, and the option C<--w32mode> -is given, it must be B<user> and the user path will be adjusted. If a +is given, it must be C<user> and the user path will be adjusted. If a user without admin rights uses the option C<--w32mode admin> a warning is issued that the caller does not have enough privileges. @@ -8321,25 +8327,13 @@ also specified. =item B<--backupdir> I<directory> -These options behave just as with the L</update> 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</update> 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<option> action (see below). If -both are given then a backup will be made to the specified I<directory>. - -You can set options via the C<option> action to automatically make -backups for all packages, and/or keep only a certain number of backups. -Please see the C<option> action for details. The default is to make one -backup. +These options behave just as with the L<update|/update +[I<option>]... [I<pkg>]...> 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. -The C<restore> action explains how to restore from a backup. +The L<restore|/restore [--json] [--backupdir I<dir>] [--all | I<pkg> +[I<rev>]]> action explains how to restore from a backup. =item B<--no-depends> @@ -8347,7 +8341,7 @@ Do not remove dependent packages. =item B<--no-depends-at-all> -See above under B<install> (and beware). +See above under L<install|/install [I<option>]... I<pkg>...> (and beware). =item B<--force> @@ -8357,8 +8351,8 @@ package will be removed unconditionally. Use with care. A package that has been removed using the C<--force> option because it is still listed in an installed collection or scheme will not be -updated, and will be mentioned as B<forcibly removed> in the output of -B<tlmgr update --list>. +updated, and will be mentioned as C<forcibly removed> in the output of +C<tlmgr update --list>. =item B<--dry-run> @@ -8381,262 +8375,7 @@ written to the terminal. =item B<repository set I<path>[#I<tag>] [I<path>[#I<tag>] ...]> -This action manages the list of repositories. See L</MULTIPLE -REPOSITORIES> below for detailed explanations. - -The first form (C<list>) lists all configured repositories and the -respective tags if set. If a path, url, or tag is given after the -C<list> keyword, it is interpreted as source from where to -initialize a TeX Live Database and lists the contained packages. -This can also be an up-to-now not used repository, both locally -and remote. If one pass in addition C<--with-platforms>, for each -package the available platforms (if any) are listed, too. - -The third form (C<add>) adds a repository -(optionally attaching a tag) to the list of repositories. The forth -form (C<remove>) removes a repository, either by full path/url, or by -tag. The last form (C<set>) sets the list of repositories to the items -given on the command line, not keeping previous settings - -In all cases, one of the repositories must be tagged as C<main>; -otherwise, all operations will fail! - -=back - -=head2 restore [--json] [--backupdir I<dir>] [--all | I<pkg> [I<rev>]] - -Restore a package from a previously-made backup. - -If C<--all> is given, try to restore the latest revision of all -package backups found in the backup directory. - -Otherwise, if neither I<pkg> nor I<rev> are given, list the available -backup revisions for all packages. With I<pkg> given but no I<rev>, -list all available backup revisions of I<pkg>. - -When listing available packages, C<tlmgr> shows the revision, and in -parenthesis the creation time if available (in format yyyy-mm-dd hh:mm). - -If (and only if) both I<pkg> and a valid revision number I<rev> are -specified, try to restore the package from the specified backup. - -Options: - -=over 4 - -=item B<--all> - -Try to restore the latest revision of all package backups found in the -backup directory. Additional non-option arguments (like I<pkg>) are not -allowed. - -=item B<--backupdir> I<directory> - -Specify the directory where the backups are to be found. If not given it -will be taken from the configuration setting in the TLPDB. - -=item B<--dry-run> - -Nothing is actually restored; instead, the actions to be performed are -written to the terminal. - -=item B<--force> - -Don't ask questions. - -=item B<--json> - -When listing backups, the option C<--json> turn on JSON output. -The format is an array of JSON objects (C<name>, C<rev>, C<date>). -For details see C<tlpkg/doc/JSON-formats.txt>, format definition: C<TLBACKUPS>. -If both C<--json> and C<--data> are given, C<--json> takes precedence. - -=back - -=head2 search [I<option>...] I<what> - -=head3 search [I<option>...] --file I<what> - -=head3 search [I<option>...] --all I<what> - -By default, search the names, short descriptions, and long descriptions -of all locally installed packages for the argument I<what>, interpreted -as a (Perl) regular expression. - -Options: - -=over 4 - -=item B<--file> - -List all filenames containing I<what>. - -=item B<--all> - -Search everything: package names, descriptions and filenames. - -=item B<--global> - -Search the TeX Live Database of the installation medium, instead of the -local installation. - -=item B<--word> - -Restrict the search of package names and descriptions (but not -filenames) to match only full words. For example, searching for -C<table> with this option will not output packages containing the word -C<tables> (unless they also contain the word C<table> on its own). - -=back - -=head2 shell - -Starts an interactive mode, where tlmgr prompts for commands. This can -be used directly, or for scripting. The first line of output is -C<protocol> I<n>, where I<n> is an unsigned number identifying the -protocol version (currently 1). - -In general, tlmgr actions that can be given on the command line -translate to commands in this shell mode. For example, you can say -C<update --list> to see what would be updated. The TLPDB is loaded the -first time it is needed (not at the beginning), and used for the rest of -the session. - -Besides these actions, a few commands are specific to shell mode: - -=over 4 - -=item protocol - -Print C<protocol I<n>>, the current protocol version. - -=item help - -Print pointers to this documentation. - -=item version - -Print tlmgr version information. - -=item quit, end, bye, byebye, EOF - -Exit. - -=item restart - -Restart C<tlmgr shell> with the original command line; most useful when -developing C<tlmgr>. - -=item load [local|remote] - -Explicitly load the local or remote, respectively, TLPDB. - -=item save - -Save the local TLPDB, presumably after other operations have changed it. - -=item get [I<var>] -=item set [I<var> [I<val>]] - -Get the value of I<var>, or set it to I<val>. Possible I<var> names: -C<debug-translation>, C<machine-readable>, C<no-execute-actions>, -C<require-verification>, C<verify-downloads>, C<repository>, and -C<prompt>. All except C<repository> and C<prompt> are booleans, taking -values 0 and 1, and behave like the corresponding command line option. -The C<repository> variable takes a string, and sets the remote -repository location. The C<prompt> variable takes a string, and sets the -current default prompt. - -If I<var> or then I<val> is not specified, it is prompted for. - -=back - -ym. - -=head2 print-platform-info - -Print the TeX Live platform identifier, TL platform long name, and -original output from guess. - -=head2 remove [I<option>]... I<pkg>... - -Remove each I<pkg> specified. Removing a collection removes all package -dependencies (unless C<--no-depends> is specified), but not any -collection dependencies of that collection. However, when removing a -package, dependencies are never removed. Options: - -=over 4 - -=item B<--all> - -Uninstalls all of TeX Live, asking for confirmation unless C<--force> is -also specified. - -=item B<--backup> - -=item B<--backupdir> I<directory> - -These options behave just as with the L</update> 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</update> 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<option> action (see below). If -both are given then a backup will be made to the specified I<directory>. - -You can set options via the C<option> action to automatically make -backups for all packages, and/or keep only a certain number of backups. -Please see the C<option> action for details. The default is to make one -backup. - -The C<restore> action explains how to restore from a backup. - -=item B<--no-depends> - -Do not remove dependent packages. - -=item B<--no-depends-at-all> - -See above under B<install> (and beware). - -=item B<--force> - -By default, removal of a package or collection that is a dependency of -another collection or scheme is not allowed. With this option, the -package will be removed unconditionally. Use with care. - -A package that has been removed using the C<--force> option because it -is still listed in an installed collection or scheme will not be -updated, and will be mentioned as B<forcibly removed> in the output of -B<tlmgr update --list>. - -=item B<--dry-run> - -Nothing is actually removed; instead, the actions to be performed are -written to the terminal. - -=back - -=head2 repository - -=over 4 - -=item B<repository list> - -=item B<repository list I<path|tag>> - -=item B<repository add I<path> [I<tag>]> - -=item B<repository remove I<path|tag>> - -=item B<repository set I<path>[#I<tag>] [I<path>[#I<tag>] ...]> - -This action manages the list of repositories. See L</MULTIPLE +This action manages the list of repositories. See L<MULTIPLE REPOSITORIES> below for detailed explanations. The first form (C<list>) lists all configured repositories and the @@ -8808,11 +8547,11 @@ If I<var> or then I<val> is not specified, it is prompted for. =head2 show -Synonym for L<info>. +Synonym for L<info|/info [I<option>...] [collections|schemes|I<pkg>...]>. =head2 uninstall -Synonym for L<remove>. +Synonym for L<remove|/remove [I<option>]... I<pkg>...>. =head2 update [I<option>]... [I<pkg>]... @@ -8956,18 +8695,18 @@ installation with the server's idea of what is available: =item B<--backup> -=item B<--backupdir> I<directory> +=item B<--backupdir> I<directory> These two options control the creation of backups of packages I<before> updating; that is, backup of packages as currently installed. If -neither options is given, no backup will made saved. 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 L</option> action (see +neither options is given, no backup will 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 L</option> action (see below). If both are given then a backup will be made to the specified I<directory>. -You can also set options via the C</option> action to automatically make +You can also set options via the L</option> action to automatically make backups for all packages, and/or keep only a certain number of backups. C<tlmgr> always makes a temporary backup when updating packages, in case @@ -8976,7 +8715,8 @@ of this C<--backup> option is to save a persistent backup in case the actual I<content> of the update causes problems, e.g., introduces an TeX incompatibility. -The L</restore> action explains how to restore from a backup. +The L<restore|/restore [--json] [--backupdir I<dir>] [--all | I<pkg> +[I<rev>]]> action explains how to restore from a backup. =item B<--no-depends> @@ -8986,7 +8726,7 @@ suppresses this behavior. =item B<--no-depends-at-all> -See above under B<install> (and beware). +See above under L<install|/install [I<option>]... I<pkg>...> (and beware). =item B<--force> @@ -9098,22 +8838,22 @@ report C<(verified)> after loading the TLPDB; otherwise, they report C<(not verified)>. But either way, by default the installation and/or updates proceed normally. -If a program named C<gpg> is available (that is, found in C<PATH>), -cryptographic signatures will be checked. In this case we require the -main repository be signed, but not any additional repositories. If -C<gpg> is not available, signatures are not checked and no verification -is carried out, but C<tlmgr> proceeds normally. +If a program named C<gpg> is available (that is, found in C<PATH>), by +default cryptographic signatures will be checked: we require the main +repository be signed, but not any additional repositories. If C<gpg> is +not available, by default signatures are not checked and no verification +is carried out, but C<tlmgr> still proceeds normally. -The behaviour of the verification can be controlled by the command line +The behavior of the verification can be controlled by the command line and config file option C<verify-repo> which takes one of the following -values: C<none>, C<main>, or C<all>. In case of C<none>, no verification -whatsoever is attempted, similar to the case when not GnuPG can be found. -In case of C<main> (the default) verification is required only for -the main repository, but attempted for all. Missing signatures of -subsidiary repositories will not result in an error. -Finally, in the case of C<all>, all repositories need to be signed. - -In all cases when a signature is checked and fails to verify, an error +values: C<none>, C<main>, or C<all>. With C<none>, no verification +whatsoever is attempted. With C<main> (the default) verification is +required only for the main repository, and only if C<gpg> is available; +though attempted for all, missing signatures of subsidiary repositories +will not result in an error. Finally, in the case of C<all>, C<gpg> +must be available and all repositories need to be signed. + +In all cases, if a signature is checked and fails to verify, an error is raised. Cryptographic verification requires checksum checking (described just @@ -9701,7 +9441,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 47220 2018-04-01 03:20:33Z preining $ +$Id: tlmgr.pl 47254 2018-04-02 23:13:43Z karl $ =cut # to remake HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html |