summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPDB.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-11-20 14:38:17 +0000
committerKarl Berry <karl@freefriends.org>2008-11-20 14:38:17 +0000
commit2ef1581f8d9e92ff91fb3bf3907af849c01c86bc (patch)
tree0325ad4dc6721dbbd10b74539278ef8f4b4c1b93 /Master/tlpkg/TeXLive/TLPDB.pm
parent1316410621c62ccec1c334c2bdd8ee663db5b014 (diff)
defend against uninitialized msgs with a broken tlpdb
git-svn-id: svn://tug.org/texlive/trunk@11373 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index a7ab0bb2838..691643ac69c 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -965,10 +965,20 @@ sub option {
}
# TODO the above function should be used in the functions below as
# far as possible ...
+
sub option_available_architectures {
my $self = shift;
if (@_) { $self->_set_option_value("available_architectures","@_"); }
- my @archs = split ' ', $self->_option_value("available_architectures");
+
+ # sadly, if the tlpdb is messed up, there may be no architectures.
+ my $val = $self->_option_value("available_architectures");
+ my @archs;
+ if (defined $val) {
+ @archs = split(" ", $val);
+ } else {
+ warn "no available_architectures, continuing anyway ...";
+ @archs = ();
+ }
return @archs;
}
sub option_create_symlinks {