diff options
author | Norbert Preining <preining@logic.at> | 2010-09-16 14:27:20 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2010-09-16 14:27:20 +0000 |
commit | e4caa4588d8cf4fa5f51a525214fc5d28775a5d9 (patch) | |
tree | 2d03e643934c408671c3744631aca8527f6d6741 /Master/tlpkg/TeXLive/TLPSRC.pm | |
parent | 65c2d2060aeaee430765b0ec72e6867f16f9d6b8 (diff) |
fix stupid error in parsing executes and all other lines in the tlpdb file:
originally the code for parsing was
if ($line =~ m/^keyword\s+(.*)\s*) {
(cum grano salis). But well, the terminal \s* will never be found since
the .* before is greedy. Solution would be to change either all the .* to .*?,
or, as done here, remove terminal whitespace and grep for (.*)$.
This gives also a slight semantics change, but that was anyway never allowed,
namely that you could write lines
revision 1234 12121 jkfj j sooooo
and still it was correctly parsed (maybe --- didn't test it).
git-svn-id: svn://tug.org/texlive/trunk@19756 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPSRC.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPSRC.pm | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm index a030f7bd53f..ac07d969b87 100644 --- a/Master/tlpkg/TeXLive/TLPSRC.pm +++ b/Master/tlpkg/TeXLive/TLPSRC.pm @@ -108,6 +108,8 @@ sub from_file if ($line =~ /^ /) { die "$srcfile: non-continuation indentation not allowed: `$line'"; } + # remove terminal white space + $line =~ s/\s*$//; # names of source packages can either be # - normal names: ^[-\w]+$ # - win32 specific packages: ^[-\w]+\.win32$ @@ -120,37 +122,40 @@ sub from_file } else { # we default to the file name as package name # $started || die "$srcfile: first directive must be `name', not $line"; - if ($line =~ /^shortdesc\s*(.*)\s*$/) { + if ($line =~ /^shortdesc\s*(.*)$/) { $shortdesc = $1; next; } elsif ($line =~ /^category\s+$CategoriesRegexp$/) { $category = $1; next; - } elsif ($line =~ /^longdesc\s+(.*)\s*$/) { + } elsif ($line =~ /^longdesc$/) { + $longdesc .= "\n"; + next; + } elsif ($line =~ /^longdesc\s+(.*)$/) { $longdesc .= "$1 "; next; - } elsif ($line =~ /^catalogue\s+(.*)\s*$/) { + } elsif ($line =~ /^catalogue\s+(.*)$/) { $catalogue = $1; next; - } elsif ($line =~ /^runpattern\s+(.*)\s*$/) { + } elsif ($line =~ /^runpattern\s+(.*)$/) { push @runpatterns, $1 if ($1 ne ""); next; - } elsif ($line =~ /^srcpattern\s+(.*)\s*$/) { + } elsif ($line =~ /^srcpattern\s+(.*)$/) { push @srcpatterns, $1 if ($1 ne ""); next; - } elsif ($line =~ /^docpattern\s+(.*)\s*$/) { + } elsif ($line =~ /^docpattern\s+(.*)$/) { push @docpatterns, $1 if ($1 ne ""); next; - } elsif ($line =~ /^binpattern\s+(.*)\s*$/) { + } elsif ($line =~ /^binpattern\s+(.*)$/) { push @binpatterns, $1 if ($1 ne ""); next; - } elsif ($line =~ /^execute\s+(.*)\s*$/) { + } elsif ($line =~ /^execute\s+(.*)$/) { push @executes, $1 if ($1 ne ""); next; - } elsif ($line =~ /^depend\s+(.*)\s*$/) { + } elsif ($line =~ /^depend\s+(.*)$/) { push @depends, $1 if ($1 ne ""); next; - } elsif ($line =~ /^postaction\s+(.*)\s*$/) { + } elsif ($line =~ /^postaction\s+(.*)$/) { push @postactions, $1 if ($1 ne ""); next; } else { |