texlive[52257] Master: download (2oct19)

commits+karl at tug.org commits+karl at tug.org
Wed Oct 2 23:17:14 CEST 2019


Revision: 52257
          http://tug.org/svn/texlive?view=revision&revision=52257
Author:   karl
Date:     2019-10-02 23:17:13 +0200 (Wed, 02 Oct 2019)
Log Message:
-----------
download (2oct19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/download/README
    trunk/Master/texmf-dist/doc/latex/download/download.pdf
    trunk/Master/texmf-dist/source/latex/download/download.tex
    trunk/Master/texmf-dist/tex/latex/download/download.sty
    trunk/Master/tlpkg/libexec/ctan2tds

Modified: trunk/Master/texmf-dist/doc/latex/download/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/download/README	2019-10-02 21:15:52 UTC (rev 52256)
+++ trunk/Master/texmf-dist/doc/latex/download/README	2019-10-02 21:17:13 UTC (rev 52257)
@@ -1,7 +1,7 @@
 %% download - download files with LaTeX
 %%
-%% Copyright (C) 2012-2013 by Simon Sigurdhsson <sigurdhsson at gmail.com>
-%% 
+%% Copyright (C) 2012-2019 by Simon Sigurdhsson <sigurdhsson at gmail.com>
+%%
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3
 %% of this license or (at your option) any later version.
@@ -9,15 +9,15 @@
 %%   http://www.latex-project.org/lppl.txt
 %% and version 1.3 or later is part of all distributions of LaTeX
 %% version 2005/12/01 or later.
-%% 
+%%
 %% This work has the LPPL maintenance status `maintained'.
-%% 
+%%
 %% The Current Maintainer of this work is Simon Sigurdhsson.
-%% 
+%%
 %% This work consists of the file download.tex
 %% and the derived file download.sty.
 
-This is version 1.0 of the download package, a package which allows
+This is version 1.2 of the download package, a package which allows
 LaTeX to download files using wget or cURL.
 
 The following files are enclosed.

Modified: trunk/Master/texmf-dist/doc/latex/download/download.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/download/download.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/download/download.tex	2019-10-02 21:15:52 UTC (rev 52256)
+++ trunk/Master/texmf-dist/source/latex/download/download.tex	2019-10-02 21:17:13 UTC (rev 52257)
@@ -1,7 +1,7 @@
 %% download - download files with LaTeX
 %%
-%% Copyright (C) 2012-2013 by Simon Sigurdhsson <sigurdhsson at gmail.com>
-%% 
+%% Copyright (C) 2012-2019 by Simon Sigurdhsson <sigurdhsson at gmail.com>
+%%
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3
 %% of this license or (at your option) any later version.
@@ -9,11 +9,11 @@
 %%   http://www.latex-project.org/lppl.txt
 %% and version 1.3 or later is part of all distributions of LaTeX
 %% version 2005/12/01 or later.
-%% 
+%%
 %% This work has the LPPL maintenance status `maintained'.
-%% 
+%%
 %% The Current Maintainer of this work is Simon Sigurdhsson.
-%% 
+%%
 %% This work consists of the file download.tex
 %% and the derived file download.sty.
 \documentclass{skdoc}
@@ -41,9 +41,12 @@
 
 \begin{document}
     % Change & version info
-    \version{1.1}
+    \version{1.2}
     \changes{1.0}{Initial version}
     \changes{1.1}{Added aria2 and axel engines}
+    \changes{1.2}{Protect a bunch of macros and conditionals. Track \pkg{expl3} changes (thanks to Phelype Oleinik)}
+    % Don't forget to update the version number and release date of
+    % the package declaration in the implementation!
 
     % Metadata
     \package[ctan=download,vcs=https://github.com/urdh/download]{download}
@@ -65,7 +68,7 @@
     access \Notice{do not indiscriminately run \hologo{pdfLaTeX} with
     the \texttt{--shell-escape} flag; using this package it would be
     possible to download malicious \texttt{.tex} that may abuse the
-    \cs{write18} access to harm your system}. 
+    \cs{write18} access to harm your system}.
 
     \section{Usage}
     The package is very simple to use, but requires a *nix platform with
@@ -88,12 +91,12 @@
     engine (wget supports \texttt{http(s)} and \texttt{ftp}, cURL
     supports a few more, aria2 supports torrent downloads and axel
     supports downloading from multiple mirrors at once\footnote{See the
-    manpage of the respective command for more information.}; for most 
+    manpage of the respective command for more information.}; for most
     cases  wget should be enough). The
     optional argument \meta{filename} makes the underlying engine save
     the file with the specified filename \Notice{this also enables file
     existence checking; without it, the engine will attempt to
-    download the file even if it exists --- wget and aria2 see the 
+    download the file even if it exists --- wget and aria2 see the
     existing file and do nothing, and axel probably replaces any existing
     file but cURL will download a new copy with a numeral suffix}.
 
@@ -111,11 +114,11 @@
 \begin{MacroCode}{package}
 \RequirePackage{expl3,l3keys2e,pdftexcmds,xparse}
 \end{MacroCode}
-    
+
     Then, we declare ourselves to provide the \thepkg\ \LaTeX3 package.
 \begin{MacroCode}{package}
 \ProvidesExplPackage{download}
-    {2013/04/08}{1.1}{download files with LaTeX}
+    {2019/10/01}{1.2}{download files with LaTeX}
 \end{MacroCode}
 
     \subsection{Messages}
@@ -130,7 +133,7 @@
 \msg_new:nnnn{download}{no-engine}{Could~not~find~any~engine!}
     {Please~make~sure~one~of~the~engines~is~installed~and~in~your~PATH.}
 \end{MacroCode}
-    
+
     We also have a message being displayed when \cs{download} is being
     used without its optional argument. This is a warning, since it may
     imply that cURL is creating a lot of unwanted files.
@@ -138,7 +141,7 @@
 \msg_new:nnnn{download}{no-name}{Using~\string\download\space~with~no~filename!}
     {This~means~I~will~download~the~file~even~if~it~already~exists.}
 \end{MacroCode}
-    
+
     The last two messages are diagnostics written to the log when
     \opt{engine} is set to \texttt{auto}.
 \begin{MacroCode}{package}
@@ -154,8 +157,9 @@
     can define a new conditional that decides if we have unrestricted
     \cs{write18}.
     \begin{macro}{\__download_if_shellescape:F}
+    \changes{1.2}{This conditional is now protected}
 \begin{MacroCode}{package}
-\prg_new_conditional:Nnn\__download_if_shellescape:{F}{
+\prg_new_protected_conditional:Nnn\__download_if_shellescape:{F}{
     \if_cs_exist:N\pdf at shellescape
 \end{MacroCode}
     If the command sequence exists (it really should), we test to see
@@ -163,7 +167,7 @@
     if no \cs{write18} access is available, two if we have restricted
     access and one if access is unrestricted.
 \begin{MacroCode}{package}
-        \if_int_compare:w\pdf at shellescape=\c_one
+        \if_int_compare:w\pdf at shellescape=\c_one_int
             \prg_return_true:
         \else:
             \prg_return_false:
@@ -187,8 +191,9 @@
     an old file may break the check.
     \begin{macro}{\__download_rm:n}[1]
         {The file to be removed}
+    \changes{1.2}{This macro is now protected}
 \begin{MacroCode}{package}
-\cs_new:Npn\__download_rm:n#1{
+\cs_new_protected:Npn\__download_rm:n#1{
     \immediate\write18{rm~#1}
 }
 \end{MacroCode}
@@ -234,8 +239,9 @@
         {Filename to save file to, or \cs{NoValue}}
         {URL to fetch the file from}
     \changes{1.1}{cURL now follows redirects}
+    \changes{1.2}{This macro is now protected}
 \begin{MacroCode}{package}
-\cs_new:Npn\__download_curl_do:nn#1#2{
+\cs_new_protected:Npn\__download_curl_do:nn#1#2{
     \IfNoValueTF{#1}{
 \end{MacroCode}
     When no optional argument is given, we just invoke cURL with the
@@ -257,8 +263,9 @@
     \begin{macro}{\__download_wget_do:nn}[2]
         {Filename to save file to, or \cs{NoValue}}
         {URL to fetch the file from}
+    \changes{1.2}{This macro is now protected}
 \begin{MacroCode}{package}
-\cs_new:Npn\__download_wget_do:nn#1#2{
+\cs_new_protected:Npn\__download_wget_do:nn#1#2{
     \IfNoValueTF{#1}{
 \end{MacroCode}
     With wget, we pass the \texttt{-q} (quiet) flag as well as the
@@ -280,8 +287,9 @@
     \begin{macro}{\__download_ariaII_do:nn}[2]
         {Filename to save file to, or \cs{NoValue}}
         {URL to fetch the file from}
+    \changes{1.2}{This macro is now protected}
 \begin{MacroCode}{package}
-\cs_new:Npn\__download_ariaII_do:nn#1#2{
+\cs_new_protected:Npn\__download_ariaII_do:nn#1#2{
     \IfNoValueTF{#1}{
 \end{MacroCode}
     With aria2, we pass the \texttt{-q} (quiet) flag as well as the
@@ -303,8 +311,9 @@
     \begin{macro}{\__download_axel_do:nn}[2]
         {Filename to save file to, or \cs{NoValue}}
         {URL to fetch the file from}
+    \changes{1.2}{This macro is now protected}
 \begin{MacroCode}{package}
-\cs_new:Npn\__download_axel_do:nn#1#2{
+\cs_new_protected:Npn\__download_axel_do:nn#1#2{
     \IfNoValueTF{#1}{
 \end{MacroCode}
     With axel, we pass the \texttt{-q} (quiet) flag.
@@ -330,8 +339,9 @@
     \begin{macro*}{\__download_if_auto_test:TF}
     \begin{macro}{\__download_if_auto_test:F}
     \changes{1.1}{Added aria2c and axel engines to stack}
+    \changes{1.2}{This conditional is now protected}
 \begin{MacroCode}{package}
-\prg_new_conditional:Nnn\__download_if_auto_test:{F,TF}{
+\prg_new_protected_conditional:Nnn\__download_if_auto_test:{F,TF}{
     \__download_if_executable_test:nTF{wget}{
         \prg_return_true:
     }{
@@ -355,13 +365,14 @@
     \end{macro*}
 
     We also define an automatic equivalent of the engine \texttt{_do}
-    macros, which selects the engines in the order wget, cURL, aria2 
+    macros, which selects the engines in the order wget, cURL, aria2
     and axel.
     \begin{macro}{\__download_auto_do:nn}[2]
         {Filename to save file to, or \cs{NoValue}}
         {URL to fetch the file from}
+    \changes{1.2}{This macro is now protected}
 \begin{MacroCode}{package}
-\cs_new:Npn\__download_auto_do:nn#1#2{
+\cs_new_protected:Npn\__download_auto_do:nn#1#2{
     \__download_if_executable_test:nTF{wget}{
         \msg_info:nn{download}{use-wget}
         \__download_wget_do:nn{#1}{#2}
@@ -468,7 +479,7 @@
 }
 \end{MacroCode}
     \end{macro}
-    
+
     And we're done.
 \begin{MacroCode}{package}
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/download/download.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/download/download.sty	2019-10-02 21:15:52 UTC (rev 52256)
+++ trunk/Master/texmf-dist/tex/latex/download/download.sty	2019-10-02 21:17:13 UTC (rev 52257)
@@ -1,7 +1,7 @@
 %% This is file `download.sty', generated from `download.tex' (key `package').
 %% download - download files with LaTeX
 %%
-%% Copyright (C) 2012-2013 by Simon Sigurdhsson <sigurdhsson at gmail.com>
+%% Copyright (C) 2012-2019 by Simon Sigurdhsson <sigurdhsson at gmail.com>
 %%
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3
@@ -20,7 +20,7 @@
 
 \RequirePackage{expl3,l3keys2e,pdftexcmds,xparse}
 \ProvidesExplPackage{download}
-    {2013/04/08}{1.1}{download files with LaTeX}
+    {2019/10/01}{1.2}{download files with LaTeX}
 \msg_new:nnnn{download}{no-write18}{Could~not~use~\string\write18!}
     {Please~run~`latex`~with~the~`--shell-escape`~flag.}
 \msg_new:nnnn{download}{no-engine}{Could~not~find~any~engine!}
@@ -31,9 +31,9 @@
 \msg_new:nnn{download}{use-wget}{Using~wget.}
 \msg_new:nnn{download}{use-ariaII}{Using~aria2.}
 \msg_new:nnn{download}{use-axel}{Using~axel.}
-\prg_new_conditional:Nnn\__download_if_shellescape:{F}{
+\prg_new_protected_conditional:Nnn\__download_if_shellescape:{F}{
     \if_cs_exist:N\pdf at shellescape
-        \if_int_compare:w\pdf at shellescape=\c_one
+        \if_int_compare:w\pdf at shellescape=\c_one_int
             \prg_return_true:
         \else:
             \prg_return_false:
@@ -42,7 +42,7 @@
         \prg_return_true:
     \fi:
 }
-\cs_new:Npn\__download_rm:n#1{
+\cs_new_protected:Npn\__download_rm:n#1{
     \immediate\write18{rm~#1}
 }
 \prg_new_conditional:Npnn\__download_if_executable_test:n#1{TF,T,F,p}{
@@ -54,7 +54,7 @@
         \prg_return_false:
     }
 }
-\cs_new:Npn\__download_curl_do:nn#1#2{
+\cs_new_protected:Npn\__download_curl_do:nn#1#2{
     \IfNoValueTF{#1}{
         \immediate\write18{curl~-L~-s~#2}
     }{
@@ -61,7 +61,7 @@
         \immediate\write18{curl~-L~-s~-o~#1~#2}
     }
 }
-\cs_new:Npn\__download_wget_do:nn#1#2{
+\cs_new_protected:Npn\__download_wget_do:nn#1#2{
     \IfNoValueTF{#1}{
         \immediate\write18{wget~-q~-nc~#2}
     }{
@@ -68,7 +68,7 @@
         \immediate\write18{wget~-q~-nc~-O~#1~#2}
     }
 }
-\cs_new:Npn\__download_ariaII_do:nn#1#2{
+\cs_new_protected:Npn\__download_ariaII_do:nn#1#2{
     \IfNoValueTF{#1}{
         \immediate\write18{aria2c~-q~--auto-file-renaming=false~#2}
     }{
@@ -75,7 +75,7 @@
         \immediate\write18{aria2c~-q~--auto-file-renaming=false~-o~#1~#2}
     }
 }
-\cs_new:Npn\__download_axel_do:nn#1#2{
+\cs_new_protected:Npn\__download_axel_do:nn#1#2{
     \IfNoValueTF{#1}{
         \immediate\write18{axel~-q~#2}
     }{
@@ -82,7 +82,7 @@
         \immediate\write18{axel~-q~-o~#1~#2}
     }
 }
-\prg_new_conditional:Nnn\__download_if_auto_test:{F,TF}{
+\prg_new_protected_conditional:Nnn\__download_if_auto_test:{F,TF}{
     \__download_if_executable_test:nTF{wget}{
         \prg_return_true:
     }{
@@ -101,7 +101,7 @@
         }
     }
 }
-\cs_new:Npn\__download_auto_do:nn#1#2{
+\cs_new_protected:Npn\__download_auto_do:nn#1#2{
     \__download_if_executable_test:nTF{wget}{
         \msg_info:nn{download}{use-wget}
         \__download_wget_do:nn{#1}{#2}

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2019-10-02 21:15:52 UTC (rev 52256)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2019-10-02 21:17:13 UTC (rev 52257)
@@ -1373,7 +1373,6 @@
  'cmextra'              => '&PREHOOK_cmextra',
  'concrete'             => '&PREHOOK_concrete',
  'ctan-o-mat'		=> '&PREHOOK_ctan_o_mat',
- 'download'             => '&PREHOOK_savepdf',
  'dynblocks'            => '&PREHOOK_flatten1',
  'enctex'		=> '&PREHOOK_flatten1',
  'fixme'                => '&PREHOOK_fixme',
@@ -1450,7 +1449,6 @@
  'cstex'                => '&POSTcstex',
  'dehyph-exptl'         => '&POSTdehyph_exptl',
  'doipubmed'            => '&POSTlatex2html',
- 'download'             => '&POST_savepdf',
  'e-french'             => '&POSTe_french',
  'encxvlna'             => '&POSTencxvlna',
  'enigma'               => '&POSTenigma',
@@ -2662,7 +2660,6 @@
  'denisbdoc' 	=> 'tex',
  'dotseqn'      => 'latex',  # requires interaction
  'delimtxt'     => 'latex -translate-file=empty.tcx',   # no 8-bit
- 'download'     => 'pdflatex', # fancy fonts, doc and subfiles combined
  'dramatist'	=> 'latex',  # requires interaction
  'drm'          => 'latex',  # requires interaction
  'duckuments'	=> 'tex',



More information about the tex-live-commits mailing list