summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-04 22:37:58 +0000
committerKarl Berry <karl@freefriends.org>2020-03-04 22:37:58 +0000
commit1060676aa889ea90c442c657b4048f6417d6f83b (patch)
tree61b7c771068219d42745dfaeb301a659d16c392b /Master/tlpkg/TeXLive
parent36da95ebf76636e1e93355f7117863f471308b3e (diff)
TLPSRC.pm (from_file): try harder to return the same shortdesc and
longdesc strings from *.tlpsrc parsing as from tlpdb. tl-update-tlpdb (main): clear $opt_catalogue_compare in addition to $opt_fix_reverse_revisions when checking for the buggy tlpdb, since the comparison tlpdb with old data (tlnet/tlpretest) can't get updated. Also, insert commented-out kludge to dump and reread Catalogue data. (compare_and_fix_tlpdbs): compare newtlpdb to the catalogue_compare TLPDB, not oldtlpdb, although it's unlikely to make much difference. (tlpobj_catalogue_equal): show shortdesc and longdesc strings. git-svn-id: svn://tug.org/texlive/trunk@54079 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLPSRC.pm15
1 files changed, 14 insertions, 1 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm
index a1515aa8fef..4a461a8fa13 100644
--- a/Master/tlpkg/TeXLive/TLPSRC.pm
+++ b/Master/tlpkg/TeXLive/TLPSRC.pm
@@ -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,16 @@ sub from_file {
if ($name =~ m/^[[:space:]]*$/) {
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;
+ #
$self->name($name);
$self->category($category);
$self->catalogue($catalogue) if $catalogue;