r756 - in branches/stable/source: . src/build-aux src/doc src/texk/kpathsea src/texk/tests/TeXLive src/texk/web2c src/texk/web2c/lib src/utils

karl at freefriends.org karl at freefriends.org
Thu Jun 2 18:39:02 CEST 2016


Author: karl
Date: 2016-06-02 16:39:01 +0000 (Thu, 02 Jun 2016)
New Revision: 756

Modified:
   branches/stable/source/Makefile
   branches/stable/source/src/build-aux/config.guess
   branches/stable/source/src/build-aux/config.sub
   branches/stable/source/src/build-aux/texinfo.tex
   branches/stable/source/src/doc/README.solaris
   branches/stable/source/src/texk/kpathsea/ChangeLog
   branches/stable/source/src/texk/kpathsea/NEWS
   branches/stable/source/src/texk/kpathsea/texmf.cnf
   branches/stable/source/src/texk/tests/TeXLive/TLUtils.pm
   branches/stable/source/src/texk/web2c/ChangeLog
   branches/stable/source/src/texk/web2c/NEWS
   branches/stable/source/src/texk/web2c/lib/ChangeLog
   branches/stable/source/src/texk/web2c/lib/texmfmp.c
   branches/stable/source/src/utils/README
Log:
sync from final TL16: r41288

Modified: branches/stable/source/Makefile
===================================================================
--- branches/stable/source/Makefile	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/Makefile	2016-06-02 16:39:01 UTC (rev 756)
@@ -3,7 +3,7 @@
 
 default:
 	@echo "make build to build,"
-	@echo "make version to see built --version."
+	@echo "make versionhelp to see built --version and --help."
 	@echo "make synctest or syncreal to sync with TL,"
 	@echo "  and make svnstatus for file lists to help with syncing." 
 	@echo "But read/understand the scripts before doing anything."

Modified: branches/stable/source/src/build-aux/config.guess
===================================================================
--- branches/stable/source/src/build-aux/config.guess	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/build-aux/config.guess	2016-06-02 16:39:01 UTC (rev 756)
@@ -2,7 +2,7 @@
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2016 Free Software Foundation, Inc.
 
-timestamp='2016-04-02'
+timestamp='2016-05-15'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -186,9 +186,12 @@
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
+	# to ELF recently (or will in the future) and ABI.
 	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+	    earm*)
+		os=netbsdelf
+		;;
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
@@ -1408,18 +1411,17 @@
 cat >&2 <<EOF
 $0: unable to guess system type
 
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
 
   http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 and
   http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches at gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches at gnu.org to
+provide the necessary information to handle your system.
 
 config.guess timestamp = $timestamp
 

Modified: branches/stable/source/src/build-aux/config.sub
===================================================================
--- branches/stable/source/src/build-aux/config.sub	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/build-aux/config.sub	2016-06-02 16:39:01 UTC (rev 756)
@@ -2,7 +2,7 @@
 # Configuration validation subroutine script.
 #   Copyright 1992-2016 Free Software Foundation, Inc.
 
-timestamp='2016-03-30'
+timestamp='2016-05-10'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -1399,7 +1399,7 @@
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
 	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
-	      | -onefs* | -tirtos*)
+	      | -onefs* | -tirtos* | -phoenix*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)

Modified: branches/stable/source/src/build-aux/texinfo.tex
===================================================================
--- branches/stable/source/src/build-aux/texinfo.tex	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/build-aux/texinfo.tex	2016-06-02 16:39:01 UTC (rev 756)
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2016-04-14.07}
+\def\texinfoversion{2016-05-07.20}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -67,6 +67,10 @@
 \everyjob{\message{[Texinfo version \texinfoversion]}%
   \catcode`+=\active \catcode`\_=\active}
 
+% LaTeX's \typeout.  This ensures that the messages it is used for
+% are identical in format to the corresponding ones from latex/pdflatex.
+\def\typeout{\immediate\write17}%
+
 \chardef\other=12
 
 % We never want plain's \outer definition of \+ in Texinfo.
@@ -1534,7 +1538,6 @@
   %
   % PDF outline support
   %
-  \pdfmakepagedesttrue \relax
   % Emulate the primitive of pdfTeX
   \def\pdfdest name#1 xyz{%
     \special{pdf:dest (name#1) [@thispage /XYZ @xpos @ypos]}%
@@ -3270,8 +3273,8 @@
 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
 % Unless we're in typewriter, use \ecfont because the CM text fonts do
 % not have braces, and we don't want to switch into math.
-\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
-\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
+\def\mylbrace{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
+\def\myrbrace{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
 \let\{=\mylbrace \let\lbracechar=\{
 \let\}=\myrbrace \let\rbracechar=\}
 \begingroup
@@ -4753,7 +4756,7 @@
 \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
 \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
 
-% Used when writing an index entry out to an index file, to prevent
+% Used when writing an index entry out to an index file to prevent
 % expansion of Texinfo commands that can appear in an index entry.
 %
 \def\indexdummies{%
@@ -4889,12 +4892,9 @@
   %
   % We want to disable all macros so that they are not expanded by \write.
   \macrolist
+  \definedummyword\value
   %
   \normalturnoffactive
-  %
-  % Handle some cases of @value -- where it does not contain any
-  % (non-fully-expandable) commands.
-  \makevalueexpandable
 }
 
 % \commondummiesnofonts: common to \commondummies and \indexnofonts.
@@ -5159,9 +5159,10 @@
   \ifx\suffix\indexisfl\def\suffix{f1}\fi
   % Open the file
   \immediate\openout\csname#1indfile\endcsname \jobname.\suffix
-  % Using \immediate here prevents an object entering into the current box,
-  % which could confound checks such as those in \safewhatsit for preceding
-  % skips.
+  % Using \immediate above here prevents an object entering into the current 
+  % box, which could confound checks such as those in \safewhatsit for
+  % preceding skips.
+  \typeout{Writing index file \jobname.\suffix}%
 \fi}
 \def\indexisfl{fl}
 
@@ -5369,6 +5370,7 @@
     % index.  The easiest way to prevent this problem is to make sure
     % there is some text.
     \putwordIndexNonexistent
+    \typeout{No file \jobname.\indexname s.}%
   \else
     \catcode`\\ = 0
     %
@@ -6682,7 +6684,14 @@
   % 1 and 2 (the page numbers aren't printed), and so are the first
   % two pages of the document.  Thus, we'd have two destinations named
   % `1', and two named `2'.
-  \ifpdf \global\pdfmakepagedesttrue \fi
+  \ifpdf
+    \global\pdfmakepagedesttrue
+  \else
+    \ifx\XeTeXrevision\thisisundefined
+    \else
+      \global\pdfmakepagedesttrue
+    \fi
+  \fi
 }
 
 
@@ -8862,6 +8871,7 @@
     % include an _ in the xref name, etc.
     \indexnofonts
     \turnoffactive
+    \def\value##1{##1}%
     \expandafter\global\expandafter\let\expandafter\Xthisreftitle
       \csname XR#1-title\endcsname
   }%
@@ -9002,14 +9012,14 @@
   \fi\fi\fi
 }
 
-% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
-% If its value is nonempty, SUFFIX is output afterward.
-%
+% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME.  SUFFIX 
+% is output afterwards if non-empty.
 \def\refx#1#2{%
   \requireauxfile
   {%
     \indexnofonts
     \otherbackslash
+    \def\value##1{##1}%
     \expandafter\global\expandafter\let\expandafter\thisrefX
       \csname XR#1\endcsname
   }%
@@ -9034,16 +9044,18 @@
   #2% Output the suffix in any case.
 }
 
-% This is the macro invoked by entries in the aux file.  Usually it's
-% just a \def (we prepend XR to the control sequence name to avoid
-% collisions).  But if this is a float type, we have more work to do.
+% This is the macro invoked by entries in the aux file.  Define a control 
+% sequence for a cross-reference target (we prepend XR to the control sequence 
+% name to avoid collisions).  The value is the page number.  If this is a float 
+% type, we have more work to do.
 %
 \def\xrdef#1#2{%
-  {% The node name might contain 8-bit characters, which in our current
-   % implementation are changed to commands like @'e.  Don't let these
-   % mess up the control sequence name.
+  {% Expand the node or anchor name to remove control sequences.
+   % \turnoffactive stops 8-bit characters being changed to commands
+   % like @'e.  \refx does the same to retrieve the value in the definition.
     \indexnofonts
     \turnoffactive
+    \def\value##1{##1}%
     \xdef\safexrefname{#1}%
   }%
   %

Modified: branches/stable/source/src/doc/README.solaris
===================================================================
--- branches/stable/source/src/doc/README.solaris	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/doc/README.solaris	2016-06-02 16:39:01 UTC (rev 756)
@@ -2,9 +2,6 @@
 
 Compiling TeX binaries on Solaris
 
-(The document describes the procedures used on Sparc Solaris binaries,
-but the same rules should apply to i386 and x86_64 as well.)
-
 Solaris 9 has been out of official support for a while and making
 software compile on that platform is challenging, so it hardly makes any
 sense to try to support it.
@@ -41,6 +38,14 @@
         SUNW_0.8;
         SUNW_0.7;
 
+Building for 64-bit
+===================
+
+All binaries have been compiled with gcc-5.2.
+The only thing that is needed to build for 64-bit is to define
+    export CC="/path/to/gcc-5.2 -m64"
+    export CXX="/path/to/g++-5.2 -m64"
+
 Building wget
 =============
 
@@ -71,6 +76,9 @@
 The definition '#define _XOPEN_SOURCE 500' has been removed from 'src/sysdep.h'
 to avoid compile error due to the fact that GCC 5 switched to -std=99. 
 
+On i386 and x86_64 one has to manually add "-lsocket -lnsl" to the last linker command.
+This should be reported upstream.
+
 > pvs Master/tlpkg/installer/wget/wget.sparc-solaris
     libsocket.so.1 (SUNW_1.4);
     libnsl.so.1 (SUNW_1.7);
@@ -108,6 +116,65 @@
 If users need binaries to run on even older systems, we can target what
 is desired by changing the map file.
 
+Building asymptote
+==================
+
+Asymptote has been built with the following flags:
+
+export CC=/opt/csw/bin/gcc-5.2
+export CXX=/opt/csw/bin/g++-5.2
+./configure --prefix=/tmp/asyinst --enable-texlive-build \
+    --disable-fftw --disable-offscreen --disable-sigsegv \
+    --disable-gl --disable-gsl --disable-readline
+
+Even though GL, GSL and readline should generally not be disabled,
+the resulting binaries would not be portable enough otherwise.
+
+Because a newer gcc compiler was used we had to link statically against stdlib.
+The following patch/hack took care of this:
+
+--- Makefile.in.orig
++++ Makefile.in
+@@ -11,7 +11,7 @@
+ GCPPLIB = @GCPPLIB@
+ GCLIBS = $(GCPPLIB) $(GCLIB)
+ LFLAGS = @LDFLAGS@
+-LIBS = $(LFLAGS) @PTHREAD_LIBS@ @LIBS@ $(GCLIBS)
++LIBS = $(LFLAGS) $(GCLIBS) -nodefaultlibs -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic @PTHREAD_LIBS@ @LIBS@ -lgcc_eh -lgcc -lc
+ DOSLIBS = $(subst -lncurses, -ltermcap, $(LIBS)) -s -static
+ 
+ PERL = perl
+------
+
+The resulting binary depends on:
+
+> pvs asy
+    libnsl.so.1 (SUNW_0.7);
+    librt.so.1 (SUNW_1.2);
+    libm.so.2 (SUNW_1.2);
+    libc.so.1 (SUNW_1.22, SUNWprivate_1.1);
+> ldd asy
+    libnsl.so.1 =>   /lib/libnsl.so.1
+    librt.so.1 =>    /lib/librt.so.1
+    libz.so.1 =>     /usr/lib/libz.so.1
+    libm.so.2 =>     /lib/libm.so.2
+    libc.so.1 =>     /lib/libc.so.1
+    libmp.so.2 =>    /lib/libmp.so.2
+    libmd.so.1 =>    /lib/libmd.so.1
+    libscf.so.1 =>   /lib/libscf.so.1
+    libaio.so.1 =>   /lib/libaio.so.1
+    libdoor.so.1 =>  /lib/libdoor.so.1
+    libuutil.so.1 => /lib/libuutil.so.1
+    libgen.so.1 =>   /lib/libgen.so.1
+
+Additional notes:
+
+* gc-7.4.2 doesn't support sparc properly, so the sources for sparc were fetched from
+  https://github.com/ivmai/bdwgc/tree/release-7_4
+  and put into gc-7.4.2
+  Running ./autogen.sh was needed before proceeding
+
+
 Building texlive
 ================
 
@@ -117,3 +184,15 @@
 The '--without-iconv' makes sure to avoid linking against libiconv
 which is not available on SunOS by default.
 
+luajittex seems to be broken on Solaris 10 x86_64 (even if it works
+with Solaris 11) and doesn't support Sparc, so it was only compiled
+for i386.
+
+upmendex is broken on x86_64 by default. A workaround is to use
+    export CFLAGS='-DU_IS_BIG_ENDIAN=0'
+    export CXXFLAGS='-DU_IS_BIG_ENDIAN=0'
+which seems to result in slower binaries for mysterious reasons.
+For that reason binaries were compiled twice, once without those flags
+and --disable-upmendex and the second time with those two flags,
+but taking just 'upmendex'.
+

Modified: branches/stable/source/src/texk/kpathsea/ChangeLog
===================================================================
--- branches/stable/source/src/texk/kpathsea/ChangeLog	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/texk/kpathsea/ChangeLog	2016-06-02 16:39:01 UTC (rev 756)
@@ -1,3 +1,12 @@
+2016-05-20  Karl Berry  <karl at tug.org>
+
+	* Version 6.2.2 for TeX Live 2016.
+
+2016-05-13  Karl Berry  <karl at tug.org>
+
+	* texmf.cnf (RISINPUTS, BLTXMLINPUTS): $TEXMF/biber
+	rather than $TEXMF/bibtex.
+
 2016-02-03  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	*knj.c: Disable unnecessary warning (w32 only).

Modified: branches/stable/source/src/texk/kpathsea/NEWS
===================================================================
--- branches/stable/source/src/texk/kpathsea/NEWS	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/texk/kpathsea/NEWS	2016-06-02 16:39:01 UTC (rev 756)
@@ -1,6 +1,6 @@
 This file records noteworthy changes.  (Public domain.)
 
-6.2.2 (for TeX Live 2016)
+6.2.2 (for TeX Live 2016, 21 May 2016)
 * gregorio added to default shell_escape_commands.
 
 6.2.1 (for TeX Live 2015, 21 May 2015)

Modified: branches/stable/source/src/texk/kpathsea/texmf.cnf
===================================================================
--- branches/stable/source/src/texk/kpathsea/texmf.cnf	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/texk/kpathsea/texmf.cnf	2016-06-02 16:39:01 UTC (rev 756)
@@ -319,8 +319,8 @@
 MLBSTINPUTS = .;$TEXMF/bibtex/{mlbst,bst}//
 
 % .ris and .bltxml bibliography formats.
-RISINPUTS = .;$TEXMF/bibtex/ris//
-BLTXMLINPUTS = .;$TEXMF/bibtex/bltxml//
+RISINPUTS = .;$TEXMF/biber/ris//
+BLTXMLINPUTS = .;$TEXMF/biber/bltxml//
 
 % MFT style files.
 MFTINPUTS = .;$TEXMF/mft//

Modified: branches/stable/source/src/texk/tests/TeXLive/TLUtils.pm
===================================================================
--- branches/stable/source/src/texk/tests/TeXLive/TLUtils.pm	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/texk/tests/TeXLive/TLUtils.pm	2016-06-02 16:39:01 UTC (rev 756)
@@ -5,7 +5,7 @@
 
 package TeXLive::TLUtils;
 
-my $svnrev = '$Revision: 40652 $';
+my $svnrev = '$Revision: 41175 $';
 my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
 sub module_revision { return $_modulerevision; }
 
@@ -31,8 +31,9 @@
 
   TeXLive::TLUtils::getenv($string);
   TeXLive::TLUtils::which($string);
-  TeXLive::TLUtils::get_system_tmpdir();
+  TeXLive::TLUtils::initialize_global_tmpdir();
   TeXLive::TLUtils::tl_tmpdir();
+  TeXLive::TLUtils::tl_tmpfile();
   TeXLive::TLUtils::xchdir($dir);
   TeXLive::TLUtils::wsystem($msg, at args);
   TeXLive::TLUtils::xsystem(@args);
@@ -123,7 +124,7 @@
     &unix
     &getenv
     &which
-    &get_system_tmpdir
+    &initialize_global_tmpdir
     &dirname
     &basename
     &dirname_and_basename
@@ -190,6 +191,7 @@
 use Cwd;
 use Getopt::Long;
 use File::Temp;
+use File::Copy qw//;
 
 use TeXLive::TLConfig;
 
@@ -453,20 +455,17 @@
   return 0;
 }
 
-=item C<get_system_tmpdir>
+=item C<initialize_global_tmpdir();>
 
-Evaluate the environment variables C<TMPDIR>, C<TMP>, and C<TEMP> in
-order to find the system temporary directory.
+Initializes a directory for all temporary files. This uses C<File::Temp>
+and thus honors various env variables like  C<TMPDIR>, C<TMP>, and C<TEMP>.
 
 =cut
 
-sub get_system_tmpdir {
-  my $systmp=0;
-  $systmp||=getenv 'TMPDIR';
-  $systmp||=getenv 'TMP';
-  $systmp||=getenv 'TEMP';
-  $systmp||='/tmp';
-  return "$systmp";
+sub initialize_global_tmpdir {
+  $::tl_tmpdir = File::Temp::tempdir(CLEANUP => 1);
+  debug("tl_tempdir: creating global tempdir $::tl_tmpdir\n");
+  return ($::tl_tmpdir);
 }
 
 =item C<tl_tmpdir>
@@ -477,9 +476,28 @@
 =cut
 
 sub tl_tmpdir {
-  return (File::Temp::tempdir(CLEANUP => 1));
+  initialize_global_tmpdir() if (!defined($::tl_tmpdir));
+  my $tmp = File::Temp::tempdir(DIR => $::tl_tmpdir, CLEANUP => 1);
+  debug("tl_tempdir: creating tempdir $tmp\n");
+  return ($tmp);
 }
 
+=item C<tl_tmpfile>
+
+Create a temporary file which is removed when the program
+is terminated. Returns file handle and file name.
+Arguments are passed on to C<File::Temp::tempfile>.
+
+=cut
+
+sub tl_tmpfile {
+  initialize_global_tmpdir() if (!defined($::tl_tmpdir));
+  my ($fh, $fn) = File::Temp::tempfile(@_, DIR => $::tl_tmpdir, UNLINK => 1);
+  debug("tl_tempfile: creating tempfile $fn\n");
+  return ($fh, $fn);
+}
+
+
 =item C<xchdir($dir)>
 
 C<chdir($dir)> or die.
@@ -1337,9 +1355,10 @@
     foreach my $h (@::install_packages_hook) {
       &$h($n,$totalnr);
     }
-    # TODO TODO
-    # we do NOT check the return value!!!
-    $fromtlpdb->install_package($package, $totlpdb);
+    # return false if something went wrong
+    if (!$fromtlpdb->install_package($package, $totlpdb)) {
+      return 0;
+    }
     $donesize += $tlpsizes{$package};
   }
   my $totaltime = time() - $starttime;
@@ -1954,7 +1973,8 @@
 
 sub check_file {
   my ($xzfile, $checksum, $checksize) = @_;
-  if ($checksum) {
+  # only run checksum tests if we can actually compute the checksum
+  if ($checksum && $::checksum_method) {
     my $tlchecksum = TeXLive::TLCrypto::tlchecksum($xzfile);
     if ($tlchecksum ne $checksum) {
       tlwarn("TLUtils::check_file: removing $xzfile, checksums differ:\n");
@@ -2042,7 +2062,9 @@
     # if the file is now not present, we can use it
     if (! -r $xzfile) {
       # try download the file and put it into temp
-      download_file($what, $xzfile);
+      if (!download_file($what, $xzfile)) {
+        return(0, "downloading did not succeed");
+      }
       # remove false downloads
       check_file($xzfile, $checksum, $size);
       if ( ! -r $xzfile ) {
@@ -2365,6 +2387,13 @@
     tlwarn ("download_file: Programs not set up, trying literal wget\n");
     $wget = "wget";
   }
+  #
+  # create output dir if necessary
+  my $par;
+  if ($dest ne "|") {
+    $par = dirname($dest);
+    mkdirhier ($par) unless -d "$par";
+  }
   my $url;
   if ($relpath =~ m;^file://*(.*)$;) {
     my $filetoopen = "/$1";
@@ -2375,7 +2404,6 @@
       # opening to a pipe always succeeds, so we return immediately
       return \*RETFH;
     } else {
-      my $par = dirname ($dest);
       if (-r $filetoopen) {
         copy ($filetoopen, $par);
         return 1;
@@ -2625,7 +2653,7 @@
     my $nn = "$oldupd.DISABLED";
     if (-r $nn) {
       my $fh;
-      ($fh, $nn) = File::Temp::tempfile( 
+      ($fh, $nn) = tl_tmpfile( 
         "updmap.cfg.DISABLED.XXXXXX", DIR => "$tmfsysconf/web2c");
     }
     print "Renaming old config file from 
@@ -2725,6 +2753,7 @@
       $tlpdblinesref, @postlines) = @_;
   my $root = $tlpdb->root;
   my @lines = ();
+  my $usermode = $tlpdb->setting( "usertree" );
   if (-r "$root/$headfile") {
     # we might be in user mode and do *not* want that the generation
     # of the configuration file just boils out.
@@ -2733,11 +2762,7 @@
     @lines = <INFILE>;
     close (INFILE);
   } else {
-    tlwarn("TLUtils::_create_config_files: $root/$headfile missing!\n");
-    # TODO
-    # if we allow tlmgr generate to generate language.* file in usermode
-    # we need to remove the die here!
-    die ("Giving up.");
+    die ("Giving up.") if (!$usermode);
   }
   push @lines, @$tlpdblinesref;
   if (defined($localconf) && -r $localconf) {
@@ -2753,17 +2778,19 @@
   if (@postlines) {
     push @lines, @postlines;
   }
-  if ($#lines >= 0) {
-    open(OUTFILE,">$dest")
-      or die("Cannot open $dest for writing: $!");
+  if ($usermode && -e $dest) {
+    tlwarn("Updating $dest, backup copy in $dest.backup\n");
+    File::Copy::copy($dest, "$dest.backup");
+  }
+  open(OUTFILE,">$dest")
+    or die("Cannot open $dest for writing: $!");
 
-    if (!$keepfirstline) {
-      print OUTFILE $cc;
-      printf OUTFILE " Generated by %s on %s\n", "$0", scalar localtime;
-    }
-    print OUTFILE @lines;
-    close(OUTFILE) || warn "close(>$dest) failed: $!";
+  if (!$keepfirstline) {
+    print OUTFILE $cc;
+    printf OUTFILE " Generated by %s on %s\n", "$0", scalar localtime;
   }
+  print OUTFILE @lines;
+  close(OUTFILE) || warn "close(>$dest) failed: $!";
 }
 
 sub parse_AddHyphen_line {
@@ -3180,7 +3207,11 @@
 
 sub tldie {
   tlwarn(@_);
-  exit(1);
+  if ($::gui_mode) {
+    Tk::exit(1);
+  } else {
+    exit(1);
+  }
 }
 
 =item C<debug_hash ($label, hash))>
@@ -3610,7 +3641,7 @@
   my $url = shift;
   my ($url_fh, $url_file);
   if ($url =~ m,^(http|ftp|file)://,) {
-    ($url_fh, $url_file) = File::Temp::tempfile(UNLINK => 1);
+    ($url_fh, $url_file) = tl_tmpfile();
     # now $url_fh filehandle is open, the file created
     # TLUtils::download_file will just overwrite what is there
     # on windows that doesn't work, so we close the fh immediately

Modified: branches/stable/source/src/texk/web2c/ChangeLog
===================================================================
--- branches/stable/source/src/texk/web2c/ChangeLog	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/texk/web2c/ChangeLog	2016-06-02 16:39:01 UTC (rev 756)
@@ -1,3 +1,7 @@
+2016-05-20  Karl Berry  <karl at tug.org>
+
+	* TeX Live 2016 release.
+
 2016-05-04  Karl Berry  <karl at freefriends.org>
 
 	* texmfmp-help.h (PDFTEXHELP) [pdfTeX]: mention pdftex.org.

Modified: branches/stable/source/src/texk/web2c/NEWS
===================================================================
--- branches/stable/source/src/texk/web2c/NEWS	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/texk/web2c/NEWS	2016-06-02 16:39:01 UTC (rev 756)
@@ -1,6 +1,6 @@
 This file records noteworthy changes.  (Public domain.)
 
-2016 (for TeX Live 2016)
+2016 (for TeX Live 2016, 21 May 2016)
 2015 (for TeX Live 2015, 21 May 2015)
 2014 (for TeX Live 2014, 24 May 2014)
 2013 (for TeX Live 2013, 30 May 2013)

Modified: branches/stable/source/src/texk/web2c/lib/ChangeLog
===================================================================
--- branches/stable/source/src/texk/web2c/lib/ChangeLog	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/texk/web2c/lib/ChangeLog	2016-06-02 16:39:01 UTC (rev 756)
@@ -1,3 +1,17 @@
+2016-05-06  Akira Kakuto  <kakuto at fuk.kinidai.ac.jp>
+
+	* texmfmp.c: Avoid to crash for too large a value of SOURCE_DATE_EPOCH.
+	(w32 only).
+
+2016-05-06  Karl Berry  <karl at tug.org>
+
+	* texmfmp.c (init_start_time, get_date_and_time) [onlyTeX]:
+	ignore SOURCE_DATE_EPOCH... envvars for original TeX.
+
+2016-05-05  Akira Kakuto  <kakuto at fuk.kinidai.ac.jp>
+
+	* texmfmp.c (strtoull) [_MSC_VER]: #define as _strtoui64.
+
 2016-05-04  Karl Berry  <karl at freefriends.org>
 
 	* texmfmp.c (init_start_time): new fn, factored out from

Modified: branches/stable/source/src/texk/web2c/lib/texmfmp.c
===================================================================
--- branches/stable/source/src/texk/web2c/lib/texmfmp.c	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/texk/web2c/lib/texmfmp.c	2016-06-02 16:39:01 UTC (rev 756)
@@ -2200,6 +2200,10 @@
 }
 #endif /* not WIN32 */
 
+#if defined(_MSC_VER)
+#define strtoull _strtoui64
+#endif
+
 static boolean start_time_set = false;
 static time_t start_time = 0;
 
@@ -2209,6 +2213,7 @@
     char *endptr;
     if (!start_time_set) {
         start_time_set = true;
+#ifndef onlyTeX
         source_date_epoch = getenv("SOURCE_DATE_EPOCH");
         if (source_date_epoch) {
             errno = 0;
@@ -2217,8 +2222,14 @@
 FATAL1 ("invalid epoch-seconds-timezone value for environment variable $SOURCE_DATE_EPOCH: %s",
                       source_date_epoch);
             }
+#if defined(_MSC_VER)
+            if (epoch > 32535291599ULL)
+                epoch = 32535291599ULL;
+#endif
             start_time = epoch;
-        } else {
+        } else
+#endif /* not onlyTeX */
+        {
             start_time = time((time_t *) NULL);
         }
     }
@@ -2235,16 +2246,20 @@
                    integer *month,  integer *year)
 {
   struct tm *tmptr;
+#ifndef onlyTeX
   string sde_texprim = getenv ("SOURCE_DATE_EPOCH_TEX_PRIMITIVES");
   if (sde_texprim && STREQ (sde_texprim, "1")) {
     init_start_time ();
     tmptr = gmtime (&start_time);
-  } else {
+  } else
+#endif /* not onlyTeX */
+    {
     /* whether the envvar was not set (usual case) or invalid,
        use current time.  */
     time_t myclock = time ((time_t *) 0);
     tmptr = localtime (&myclock);
 
+#ifndef onlyTeX
     /* warn if they gave an invalid value, empty (null string) ok.  */
     if (sde_texprim && strlen (sde_texprim) > 0
         && !STREQ (sde_texprim, "0")) {
@@ -2251,6 +2266,7 @@
 WARNING1 ("invalid value (expected 0 or 1) for environment variable $SOURCE_DATE_EPOCH_TEX_PRIMITIVES: %s", 
           sde_texprim);
     }
+#endif /* not onlyTeX */
   }
 
   *minutes = tmptr->tm_hour * 60 + tmptr->tm_min;
@@ -3029,10 +3045,6 @@
     }
 }
 
-#if defined(_MSC_VER)
-#define strtoll _strtoi64
-#endif
-
 void initstarttime(void)
 {
     if (!start_time_set) {

Modified: branches/stable/source/src/utils/README
===================================================================
--- branches/stable/source/src/utils/README	2016-06-01 21:41:08 UTC (rev 755)
+++ branches/stable/source/src/utils/README	2016-06-02 16:39:01 UTC (rev 756)
@@ -1,4 +1,4 @@
-$Id: README 40025 2016-03-14 22:52:10Z karl $
+$Id: README 41077 2016-05-12 23:14:19Z karl $
 Public domain.  Originally written 2005 by Karl Berry.
 
 Extra utilities we (optionally) compile for TeX Live.
@@ -5,7 +5,7 @@
 See comments in ../texk/README.
 
 
-asymptote 2.37 - checked 14mar16
+asymptote 2.38 - checked 13may16
   (this version for dev build testing only, not to be installed)
   update to TL from CTAN, to include prebuilt doc.
   see http://tug.org/texlive/build.html#asymptote
@@ -21,7 +21,7 @@
 m-tx 0.62 - checked 10feb16
   http://ctan.org/pkg/m-tx/
 
-pmx 2.7.3 - checked 10feb16
+pmx 2.7.4 - checked 13may16
   http://ctan.org/pkg/pmx/
 
 ps2eps 1.68 - checked 10may12



More information about the pdftex-commits mailing list