summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPOBJ.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm44
1 files changed, 27 insertions, 17 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index b13e1655594..5e3804d87a6 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -113,6 +113,8 @@ sub from_fh {
die("Continuation of $lastcmd not allowed, please fix tlpobj: line = $line!\n");
}
}
+ # remove white space at the end of a line
+ $line =~ s/\s*$//;
if ($line =~ /^name\s*([-.\w]+)/o) {
$name = "$1";
$lastcmd = "name";
@@ -144,7 +146,7 @@ sub from_fh {
}
}
next;
- } elsif ($line =~ /^binfilescontinued\s+(.*)\s*/o) {
+ } elsif ($line =~ /^binfilescontinued\s+(.*)$/o) {
push @{$self->{'binfiles'}{$arch}}, "$1";
next;
} elsif ($line =~ /^binfiles\s+/o) {
@@ -166,7 +168,15 @@ sub from_fh {
}
$lastcmd = "binfiles";
next;
- } elsif ($line =~ /^longdesc\s+(.*)\s*/o) {
+ } elsif ($line eq "longdesc") {
+ if (defined($self->{'longdesc'})) {
+ $self->{'longdesc'} .= " ";
+ } else {
+ $self->{'longdesc'} = "";
+ }
+ $lastcmd = "longdesc";
+ next;
+ } elsif ($line =~ /^longdesc\s+(.*)$/o) {
if (defined($self->{'longdesc'})) {
$self->{'longdesc'} .= " $1";
} else {
@@ -174,7 +184,7 @@ sub from_fh {
}
$lastcmd = "longdesc";
next;
- } elsif ($line =~ /^category\s+(.*)\s*/o) {
+ } elsif ($line =~ /^category\s+(.*)$/o) {
$self->{'category'} = "$1";
$lastcmd = "category";
if ($self->{'category'} !~ /^$CategoriesRegexp/o) {
@@ -182,39 +192,39 @@ sub from_fh {
. $self->name . " found.\nPlease update texlive.infra.\n");
}
next;
- } elsif ($line =~ /^relocated\s+([01])\s*/o) {
+ } elsif ($line =~ /^relocated\s+([01])$/o) {
$self->relocated("$1");
$lastcmd = "relocated";
next;
- } elsif ($line =~ /^revision\s+(.*)\s*/o) {
+ } elsif ($line =~ /^revision\s+(.*)$/o) {
$self->{'revision'} = "$1";
$lastcmd = "revision";
next;
- } elsif ($line =~ /^containersize\s+([0-9]+)\s*/o) {
+ } elsif ($line =~ /^containersize\s+([0-9]+)$/o) {
$self->containersize("$1");
$lastcmd = "containersize";
next;
- } elsif ($line =~ /^srccontainersize\s+([0-9]+)\s*/o) {
+ } elsif ($line =~ /^srccontainersize\s+([0-9]+)$/o) {
$self->srccontainersize("$1");
$lastcmd = "srccontainersize";
next;
- } elsif ($line =~ /^doccontainersize\s+([0-9]+)\s*/o) {
+ } elsif ($line =~ /^doccontainersize\s+([0-9]+)$/o) {
$self->doccontainersize("$1");
$lastcmd = "doccontainersize";
next;
- } elsif ($line =~ /^containermd5\s+([a-f0-9]+)\s*/o) {
+ } elsif ($line =~ /^containermd5\s+([a-f0-9]+)$/o) {
$self->containermd5("$1");
$lastcmd = "containermd5";
next;
- } elsif ($line =~ /^srccontainermd5\s+([a-f0-9]+)\s*/o) {
+ } elsif ($line =~ /^srccontainermd5\s+([a-f0-9]+)$/o) {
$self->srccontainermd5("$1");
$lastcmd = "srccontainermd5";
next;
- } elsif ($line =~ /^doccontainermd5\s+([a-f0-9]+)\s*/o) {
+ } elsif ($line =~ /^doccontainermd5\s+([a-f0-9]+)$/o) {
$self->doccontainermd5("$1");
$lastcmd = "doccontainermd5";
next;
- } elsif ($line =~ /^catalogue\s+(.*)\s*/o) {
+ } elsif ($line =~ /^catalogue\s+(.*)$/o) {
$self->catalogue("$1");
$lastcmd = "catalogue";
next;
@@ -235,23 +245,23 @@ sub from_fh {
$self->{"${type}size"} = $size;
}
next;
- } elsif ($line =~ /^execute(continued)?\s*(.*)\s*/o) {
+ } elsif ($line =~ /^execute(continued)?\s*(.*)$/o) {
push @{$self->{'executes'}}, "$2" unless "$2" eq "";
$lastcmd = "execute";
next;
- } elsif ($line =~ /^postaction(continued)?\s*(.*)\s*/o) {
+ } elsif ($line =~ /^postaction(continued)?\s*(.*)$/o) {
push @{$self->{'postactions'}}, "$2" unless "$2" eq "";
$lastcmd = "postaction";
next;
- } elsif ($line =~ /^depend(continued)?\s*(.*)\s*/o) {
+ } elsif ($line =~ /^depend(continued)?\s*(.*)$/o) {
push @{$self->{'depends'}}, "$2" unless "$2" eq "";
$lastcmd = "depend";
next;
- } elsif ($line =~ /^catalogue-([^\s]+)\s+(.*)\s*/o) {
+ } elsif ($line =~ /^catalogue-([^\s]+)\s+(.*)$/o) {
$self->{'cataloguedata'}{$1} = "$2";
} elsif ($line =~ /^catalogue-([^\s]+)\s*/o) {
1; # ignore e.g. catalogue-ctan without parameter
- } elsif ($line =~ /^shortdesc\s+(.*)\s*/o) {
+ } elsif ($line =~ /^shortdesc\s+(.*)$/o) {
$self->{'shortdesc'} .= "$1";
$lastcmd = "shortdesc";
next;