diff options
author | Norbert Preining <preining@logic.at> | 2008-07-04 14:36:10 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-07-04 14:36:10 +0000 |
commit | 6737a5115a3e6b41f7fb21196e3bc9dbfaa09b8f (patch) | |
tree | 6614d7718520f7b7a800c605817cb864caea5e29 /Master/tlpkg/TeXLive | |
parent | 679b80ccf2e74624dba6f7f7a42a995625d59b43 (diff) |
TLPDB.pm: die if no package can be read from tlpdb file
git-svn-id: svn://tug.org/texlive/trunk@9237 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index cb1298921b2..7296e9dc33d 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -241,14 +241,19 @@ sub from_file { $retfh = \*TMP; } my $found = 0; + my $ret = 0; do { my $tlp = TeXLive::TLPOBJ->new; ddebug("creating tlp from $path...\n"); - $found = $tlp->from_fh($retfh,1); - if ($found) { + $ret = $tlp->from_fh($retfh,1); + if ($ret) { $self->add_tlpobj($tlp); + $found++; } - } until (!$found); + } until (!$ret); + if (!$found) { + die("Cannot read any package from $path, seems not to be a TLPDB!"); + } } =pod |