summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-12 23:01:17 +0000
committerKarl Berry <karl@freefriends.org>2013-04-12 23:01:17 +0000
commit879e67d4e530cd1a38e1a80a4f779dacd44636dc (patch)
tree00d16b7e64cd3717ad4e16a024e00b47cc549496 /Build/source
parent512547ff22232693018f59e34d48351f031c4c33 (diff)
context (size 11122862, Apr 11 19:56)
git-svn-id: svn://tug.org/texlive/trunk@29878 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun78
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl84
2 files changed, 97 insertions, 65 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 d337ed75f74..18d9d9a8d1f 100755
--- a/Build/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun
+++ b/Build/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun
@@ -7400,7 +7400,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-mrg"] = package.loaded["util-mrg"] or true
--- original size: 7294, stripped down to: 5798
+-- original size: 7757, stripped down to: 6015
if not modules then modules={} end modules ['util-mrg']={
version=1.001,
@@ -7457,17 +7457,23 @@ local close=P("]")*C(equals)*P("]")
local closeeq=Cmt(close*Cb("init"),function(s,i,a,b) return a==b end)
local longstring=open*(1-closeeq)^0*close
local quoted=patterns.quoted
+local digit=patterns.digit
local emptyline=space^0*eol
local operator1=P("<=")+P(">=")+P("~=")+P("..")+S("/^<>=*+%%")
local operator2=S("*+/")
local operator3=S("-")
+local operator4=P("..")
local separator=S(",;")
local ignore=(P("]")*space^1*P("=")*space^1*P("]"))/"]=["+(P("=")*space^1*P("{"))/"={"+(P("(")*space^1)/"("+(P("{")*(space+eol)^1*P("}"))/"{}"
local strings=quoted
local longcmt=(emptyline^0*P("--")*longstring*emptyline^0)/""
local longstr=longstring
local comment=emptyline^0*P("--")*P("-")^0*(1-eol)^0*emptyline^1/"\n"
-local pack=((eol+space)^0/"")*operator1*((eol+space)^0/"")+((eol+space)^0/"")*operator2*((space)^0/"")+((eol+space)^1/"")*operator3*((space)^1/"")+((space)^0/"")*separator*((space)^0/"")
+local optionalspaces=space^0/""
+local mandatespaces=space^1/""
+local optionalspacing=(eol+space)^0/""
+local mandatespacing=(eol+space)^1/""
+local pack=digit*space^1*operator4*optionalspacing+optionalspacing*operator1*optionalspacing+optionalspacing*operator2*optionalspaces+mandatespacing*operator3*mandatespaces+optionalspaces*separator*optionalspaces
local lines=emptyline^2/"\n"
local spaces=(space*space)/" "
local compact=Cs ((
@@ -11543,7 +11549,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-exp"] = package.loaded["data-exp"] or true
--- original size: 14643, stripped down to: 9517
+-- original size: 14654, stripped down to: 9517
if not modules then modules={} end modules ['data-exp']={
version=1.001,
@@ -12173,7 +12179,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-tmp"] = package.loaded["data-tmp"] or true
--- original size: 14308, stripped down to: 10956
+-- original size: 14615, stripped down to: 11208
if not modules then modules={} end modules ['data-tmp']={
version=1.100,
@@ -12183,7 +12189,7 @@ if not modules then modules={} end modules ['data-tmp']={
license="see context related readme files"
}
local format,lower,gsub,concat=string.format,string.lower,string.gsub,table.concat
-local serialize,serializetofile=table.serialize,table.tofile
+local concat,serialize,serializetofile=table.concat,table.serialize,table.tofile
local mkdirs,isdir,isfile=dir.mkdirs,lfs.isdir,lfs.isfile
local addsuffix,is_writable,is_readable=file.addsuffix,file.is_writable,file.is_readable
local formatters=string.formatters
@@ -12296,20 +12302,27 @@ local function identify()
end
return writable,readables
end
-function caches.usedpaths()
+function caches.usedpaths(separator)
local writable,readables=identify()
if #readables>1 then
local result={}
+ local done={}
for i=1,#readables do
local readable=readables[i]
- if usedreadables[i] or readable==writable then
- result[#result+1]=formatters["readable: %a (order %s)"](readable,i)
+ if readable==writable then
+ done[readable]=true
+ result[#result+1]=formatters["readable+writable: %a"](readable)
+ elseif usedreadables[i] then
+ done[readable]=true
+ result[#result+1]=formatters["readable: %a"](readable)
end
end
- result[#result+1]=formatters["writable: %a"](writable)
- return result
+ if not done[writable] then
+ result[#result+1]=formatters["writable: %a"](writable)
+ end
+ return concat(result,separator or " | ")
else
- return writable
+ return writable or "?"
end
end
function caches.configfiles()
@@ -12642,7 +12655,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-res"] = package.loaded["data-res"] or true
--- original size: 60857, stripped down to: 42496
+-- original size: 61118, stripped down to: 42544
if not modules then modules={} end modules ['data-res']={
version=1.001,
@@ -12685,12 +12698,16 @@ resolvers.homedir=environment.homedir
resolvers.criticalvars=allocate { "SELFAUTOLOC","SELFAUTODIR","SELFAUTOPARENT","TEXMFCNF","TEXMF","TEXOS" }
resolvers.luacnfname="texmfcnf.lua"
resolvers.luacnfstate="unknown"
-if environment.default_texmfcnf then
- resolvers.luacnfspec=environment.default_texmfcnf
-else
- resolvers.luacnfspec="{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
+resolvers.luacnfspec={
+ "home:texmf/web2c",
+ "selfautoparent:/texmf-local/web2c",
+ "selfautoparent:/texmf-context/web2c",
+ "selfautoparent:/texmf-dist/web2c",
+ "selfautoparent:/texmf/web2c",
+}
+if type(resolvers.luacnfspec)=="table" then
+ resolvers.luacnfspec=concat(resolvers.luacnfspec,";")
end
-resolvers.luacnfspec='home:texmf/web2c;'..resolvers.luacnfspec
local unset_variable="unset"
local formats=resolvers.formats
local suffixes=resolvers.suffixes
@@ -14050,7 +14067,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-pre"] = package.loaded["data-pre"] or true
--- original size: 6430, stripped down to: 4219
+-- original size: 6643, stripped down to: 4401
if not modules then modules={} end modules ['data-pre']={
version=1.001,
@@ -14064,7 +14081,7 @@ local prefixes=utilities.storage.allocate()
resolvers.prefixes=prefixes
local cleanpath,findgivenfile,expansion=resolvers.cleanpath,resolvers.findgivenfile,resolvers.expansion
local getenv=resolvers.getenv
-local P,S,R,C,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.R,lpeg.C,lpeg.Cs,lpeg.match
+local P,S,R,C,Cs,Cc,lpegmatch=lpeg.P,lpeg.S,lpeg.R,lpeg.C,lpeg.Cs,lpeg.Cc,lpeg.match
local joinpath,basename,dirname=file.join,file.basename,file.dirname
local getmetatable,rawset,type=getmetatable,rawset,type
prefixes.environment=function(str)
@@ -14163,6 +14180,10 @@ function resolvers.resetresolve(str)
resolved,abstract={},{}
end
local pattern=Cs((C(R("az")^2)*P(":")*C((1-S(" \"\';,"))^1)/_resolve_+P(1))^0)
+local prefix=C(R("az")^2)*P(":")
+local target=C((1-S(" \"\';,"))^1)
+local notarget=(#S(";,")+P(-1))*Cc("")
+local pattern=Cs(((prefix*(target+notarget))/_resolve_+P(1))^0)
local function resolve(str)
if type(str)=="table" then
local t={}
@@ -15413,7 +15434,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-lib"] = package.loaded["util-lib"] or true
--- original size: 10762, stripped down to: 5269
+-- original size: 10985, stripped down to: 5458
if not modules then modules={} end modules ['util-lib']={
version=1.001,
@@ -15531,10 +15552,14 @@ local function requireswiglib(required,version)
if trace_swiglib then
report_swiglib("found: %a",found_library)
end
- library=package.loadlib(found_library,"luaopen_"..required_base)
- if type(library)=="function" then
+ local message=nil
+ local opener="luaopen_"..required_base
+ library,message=package.loadlib(found_library,opener)
+ local libtype=type(library)
+ if libtype=="function" then
library=library()
else
+ report_swiglib("load error: %a returns %a, message %a",opener,libtype,message or "no message")
library=false
end
dir.pop()
@@ -15820,8 +15845,8 @@ end -- of closure
-- used libraries : l-lua.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-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.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-mrg.lua util-tpl.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 : 660467
--- stripped bytes : 242438
+-- original bytes : 661945
+-- stripped bytes : 243028
-- end library merge
@@ -16264,6 +16289,11 @@ function runners.execute_script(fullname,internal,nosplit)
environment.ownscript = result
dofile(result)
else
+local texmfcnf = resolvers.getenv("TEXMFCNF")
+if not texmfcnf or texmfcnf == "" then
+ texmfcnf = resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.resolve(resolvers.luacnfspec)))
+ resolvers.setenv("TEXMFCNF",table.concat(texmfcnf,";")) -- for running texexec etc (after tl change to texmf-dist)
+end
local binary = runners.applications[file.suffix(result)]
result = string.quoted(string.unquoted(result))
-- if string.match(result,' ') and not string.match(result,"^\".*\"$") then
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index 2c13056549d..5814649c211 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 29829 2013-04-10 18:39:51Z karl $
+# $Id: tlmgr.pl 29870 2013-04-11 23:34:02Z karl $
#
# Copyright 2008-2013 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
-my $svnrev = '$Revision: 29829 $';
-my $datrev = '$Date: 2013-04-10 20:39:51 +0200 (Wed, 10 Apr 2013) $';
+my $svnrev = '$Revision: 29870 $';
+my $datrev = '$Date: 2013-04-12 01:34:02 +0200 (Fri, 12 Apr 2013) $';
my $tlmgrrevision;
my $prg;
if ($svnrev =~ m/: ([0-9]+) /) {
@@ -293,11 +293,11 @@ sub main {
# because stupid Debian/Ubuntu ships a stub that does nothing
# which is very very bad idea
# try to check for that, too
- my $ret = system("perldoc -V > /dev/null 2>&1");
+ my $ret = system("perldoc -V >/dev/null 2>&1");
if ($ret == 0) {
- debug("Working perldoc found, using it.\n");
+ debug("working perldoc found, using it\n");
} else {
- tlwarn("Your perldoc seems to be non functional!\n");
+ tlwarn("$prg: perldoc seems to be non-functional, not using it.\n");
@noperldoc = ("-noperldoc", "1");
}
}
@@ -4685,6 +4685,7 @@ sub check_runfiles {
|libertine\.sty
|m-tex4ht\.tex
|metatex\.tex
+ |noEmbed\.map
|ps2mfbas\.mf
|pstricks\.con
|sample\.bib
@@ -5507,11 +5508,10 @@ FROZEN
# finish handles the -pause option (wait for input from stdin),
-# and then exits unless the global $::gui_mode is set, in which case we
+# and then exits unless the global $::gui_mode is set, in which case we
# merely return.
#
-sub finish
-{
+sub finish {
my ($ret) = @_;
if ($ret > 0) {
@@ -5524,25 +5524,20 @@ sub finish
}
if ($::gui_mode) {
- return($ret);
+ return $ret;
} else {
exit($ret);
}
}
-#
-# config file handling
-# config files are located in TEXMFCONFIG/tlmgr/config thus specific
-# for each user
+
+# tlmgr config file handling. These config files are located in
+# TEXMFCONFIG/tlmgr/config, thus specific for each user.
#
# format:
# key=value
#
-# allowed keys at the moment
-# gui-expertmode = 0|1
-#
-sub load_config_file
-{
+sub load_config_file {
#
# first set default values
# the default for gui-expertmode is 1 since that is what we
@@ -5555,9 +5550,12 @@ sub load_config_file
chomp (my $TEXMFCONFIG = `kpsewhich -var-value=TEXMFCONFIG`);
my $fn = "$TEXMFCONFIG/tlmgr/config";
$tlmgr_config_file = TeXLive::TLConfFile->new($fn, "#", "=");
+
+ # switched names for this one after initial release.
if ($tlmgr_config_file->key_present("gui_expertmode")) {
$tlmgr_config_file->rename_key("gui_expertmode", "gui-expertmode");
}
+
for my $key ($tlmgr_config_file->keys) {
my $val = $tlmgr_config_file->value($key);
if ($key eq "gui-expertmode") {
@@ -5566,32 +5564,35 @@ sub load_config_file
} elsif ($val eq "1") {
$config{"gui-expertmode"} = 1;
} else {
- tlwarn("Unknown value >$val< for gui-expertmode in $fn\n");
+ tlwarn("$fn: Unknown value for gui-expertmode: $val\n");
}
+
} elsif ($key eq "persistent-downloads") {
if (($val eq "0") || ($val eq "1")) {
$config{'persistent-downloads'} = $val;
} else {
- tlwarn("Unknown value $val for persistent-downloads in $fn\n");
+ tlwarn("$fn: Unknown value for persistent-downloads: $val\n");
}
+
} elsif ($key eq "gui-lang") {
$config{'gui-lang'} = $val;
+
} elsif ($key eq "auto-remove") {
if ($val eq "0") {
$config{"auto-remove"} = 0;
} elsif ($val eq "1") {
$config{"auto-remove"} = 1;
} else {
- tlwarn("Unknown value >$val< for auto-remove in $fn\n");
+ tlwarn("$fn: Unknown value for auto-remove: $val\n");
}
+
} else {
- tlwarn("Unknown key $key in $fn\n");
+ tlwarn("$fn: Unknown tlmgr configuration variable: $key\n");
}
}
}
-sub write_config_file
-{
+sub write_config_file {
if (!defined($tlmgr_config_file)) {
chomp (my $TEXMFCONFIG = `kpsewhich -var-value=TEXMFCONFIG`);
my $dn = "$TEXMFCONFIG/tlmgr";
@@ -6501,12 +6502,12 @@ The C<pinning> action manages the pinning file, see L<Pinning> below.
Shows the current pinning data.
-=item C<pinning add I<repo> I<pkgglob>...
+=item C<pinning add> I<repo> I<pkgglob>...
Pins the packages matching the I<pkgglob>(s) to the repository
I<repo>.
-=item C<pinning remove I<repo> I<pkgglob>...
+=item C<pinning remove> I<repo> I<pkgglob>...
Any packages recorded in the pinning file matching the <pkgglob>s for
the given repository I<repo> are removed.
@@ -6812,7 +6813,7 @@ has also been removed from the respective collection), C<tlmgr> will
remove the package in the local installation. This is called
``auto-remove'' and is announced as such when using the option
C<--list>. This auto-removal can be suppressed using the option
-C<--no-auto-remove>.
+C<--no-auto-remove> (not recommended, see option description).
Analogously, if a package has been added to a collection on the server
that is also installed locally, it will be added to the local
@@ -6886,10 +6887,12 @@ supported in these circumstances.
=item B<--no-auto-remove> [I<pkg>]...
-Under normal circumstances C<tlmgr> tries to remove packages which have
-disappeared on the server, as described above under C<--all>. This
-option prevents any such removals, either for all packages (with
-C<--all>), or the given I<pkg> names.
+By default, C<tlmgr> tries to remove packages which have disappeared on
+the server, as described above under C<--all>. This option prevents
+such removals, either for all packages (with C<--all>), or for just the
+given I<pkg> names. This can lead to an inconsistent TeX installation,
+since packages are not infrequently renamed or replaced by their
+authors. Therefore this is not recommend.
=item B<--no-auto-install> [I<pkg>]...
@@ -6983,15 +6986,14 @@ other lines must look like
key = value
-where the allowed keys are
-C<gui-expertmode> (values 0 or 1),
-C<persistent-downloads> (values 0 or 1), C<auto-remove> (values 0 or 1),
-and C<gui-lang> (values like the command line arguments).
-C<persistent-downloads>, C<gui-lang>, and C<auto-remove> correspond to the
-respective command line options of the same name.
-C<gui-expertmode> switches between the full
-GUI and a simplified GUI with only the important and mostly used
-settings.
+where the allowed keys are C<gui-expertmode> (value 0 or 1),
+C<persistent-downloads> (value 0 or 1), C<auto-remove> (value 0 or 1),
+and C<gui-lang> (value like in the command line option).
+
+C<persistent-downloads>, C<gui-lang>, and C<auto-remove> correspond to
+the respective command line options of the same name. C<gui-expertmode>
+switches between the full GUI and a simplified GUI with only the
+important and mostly used settings.
=head1 TAXONOMIES