diff options
author | Norbert Preining <norbert@preining.info> | 2020-04-11 03:09:12 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-04-11 03:09:12 +0000 |
commit | c2697fc286a1e2c94fd9968b76be6f4a6d2114cd (patch) | |
tree | 1dc2cfb07cb032740483dd8be7c74aff66b70352 /systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm | |
parent | 25111608e6aa05042b0c6f83009262e1973d7a45 (diff) |
CTAN sync 202004110309
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm')
-rw-r--r-- | systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm index 4cc6af6220..497b8e8b39 100644 --- a/systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm +++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm @@ -1,4 +1,4 @@ -# $Id: TLPSRC.pm 53428 2020-01-16 23:29:27Z karl $ +# $Id: TLPSRC.pm 54413 2020-03-20 06:49:12Z hironobu $ # TeXLive::TLPSRC.pm - module for handling tlpsrc files # Copyright 2007-2020 Norbert Preining # This file is licensed under the GNU General Public License version 2 @@ -12,7 +12,7 @@ use TeXLive::TLUtils; use TeXLive::TLPOBJ; use TeXLive::TLTREE; -my $svnrev = '$Revision: 53428 $'; +my $svnrev = '$Revision: 54413 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -184,7 +184,10 @@ sub from_file { $shortdesc = ""; } elsif ($line =~ /^longdesc$/) { - $longdesc .= "\n"; + # We need to use a space here instead of a newline so that strings + # read from *.tlpsrc and tlpdb come out the same; see $shortdesc + # and $longdesc assignments below. + $longdesc .= " "; } elsif ($line =~ /^longdesc\s+(.*)$/) { $longdesc .= "$1 "; @@ -228,6 +231,18 @@ sub from_file { if ($name =~ m/^[[:space:]]*$/) { die "Cannot deduce name from file argument and name tag not found"; } + # + # We should call TeXCatalogue::beautify(), but let's be lazy since not + # everything comes up in practice. We want the parsing from .tlpsrc to + # result in exactly the same string, including spaces, as parsing from + # texlive.tlpdb. Otherwise tl-update-tlpdb's tlpdb_catalogue_compare + # will think the strings are always different. + $shortdesc =~ s/\s+$//g; # rm trailing whitespace (shortdesc) + $longdesc =~ s/\s+$//g; # rm trailing whitespace (longdesc) + $longdesc =~ s/\s\s+/ /g; # collapse multiple whitespace characters to one + # see comments in beautify. + $longdesc =~ s,http://grants.nih.gov/,grants.nih.gov/,g; + # $self->name($name); $self->category($category); $self->catalogue($catalogue) if $catalogue; @@ -946,8 +961,8 @@ On W32 declares files with the extenstion I<.ext> of file type I<name>. =item C<postaction script file=I<file> [filew32=I<filew32>]> This postaction executes the given I<file> with two arguments, the first -being the root of the installation, the second being either the string -C<install> or C<remove>. +being either the string C<install> or C<remove>, the second being the +root of the installation. If the C<filew32> argument is given this script is run on Windows systems instead of the one given via C<file>. |