texlive[54167] Master/tlpkg: TLPSRC.pm (from_file),
commits+karl at tug.org
commits+karl at tug.org
Sat Mar 7 23:55:02 CET 2020
Revision: 54167
http://tug.org/svn/texlive?view=revision&revision=54167
Author: karl
Date: 2020-03-07 23:55:02 +0100 (Sat, 07 Mar 2020)
Log Message:
-----------
TLPSRC.pm (from_file),
TeXCatalogue.pm (beautify): collapse multiple whitespace.
(Still on the quest for identical longdesc results from our various
sources.)
Modified Paths:
--------------
trunk/Master/tlpkg/TeXLive/TLPSRC.pm
trunk/Master/tlpkg/TeXLive/TeXCatalogue.pm
trunk/Master/tlpkg/doc/releng.txt
Modified: trunk/Master/tlpkg/TeXLive/TLPSRC.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLPSRC.pm 2020-03-07 22:52:33 UTC (rev 54166)
+++ trunk/Master/tlpkg/TeXLive/TLPSRC.pm 2020-03-07 22:55:02 UTC (rev 54167)
@@ -232,14 +232,14 @@
die "Cannot deduce name from file argument and name tag not found";
}
#
- # We should probably call TeXCatalogue::beautify(), but trailing
- # whitespace seems to be the only thing that 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;
- $longdesc =~ s/\s+$//g;
+ # 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
#
$self->name($name);
$self->category($category);
Modified: trunk/Master/tlpkg/TeXLive/TeXCatalogue.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TeXCatalogue.pm 2020-03-07 22:52:33 UTC (rev 54166)
+++ trunk/Master/tlpkg/TeXLive/TeXCatalogue.pm 2020-03-07 22:55:02 UTC (rev 54167)
@@ -140,7 +140,8 @@
$txt =~ s/\n/ /g; # make one line
$txt =~ s/^\s+//g; # rm leading whitespace
$txt =~ s/\s+$//g; # rm trailing whitespace
- $txt =~ s/\s\s+/ /g; # multiple spaces to one
+ $txt =~ s/\s\s+/ /g; # collapse multiple whitespace characters to one
+ $txt =~ s/\t/ /g; # tabs to spaces
# transliterate to ascii: it allows the final tlpdb to be pure ascii,
# avoiding problems since we don't control the user's terminal encoding
return Text::Unidecode::unidecode($txt);
Modified: trunk/Master/tlpkg/doc/releng.txt
===================================================================
--- trunk/Master/tlpkg/doc/releng.txt 2020-03-07 22:52:33 UTC (rev 54166)
+++ trunk/Master/tlpkg/doc/releng.txt 2020-03-07 22:55:02 UTC (rev 54167)
@@ -164,7 +164,7 @@
unzip -q newperl.zip # replace All files
comm -13 /tmp/now /tmp/new >/tmp/c2
comm -23 /tmp/now /tmp/new >/tmp/c1
- wc -l /tmp/c1 /tmp/c2 # should not be everything
+ wc -l /tmp/c1 /tmp/c2 # should be about 100-200, not 1500+
svn rm `cat /tmp/c1`
svn add --parents --no-auto-props `cat /tmp/c2`
svn status | fgrep \? # shouldn't be any besides newperl.zip
More information about the tex-live-commits
mailing list.