From 2ef1581f8d9e92ff91fb3bf3907af849c01c86bc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 20 Nov 2008 14:38:17 +0000 Subject: defend against uninitialized msgs with a broken tlpdb git-svn-id: svn://tug.org/texlive/trunk@11373 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPDB.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Master/tlpkg/TeXLive/TLPDB.pm') 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 { -- cgit v1.2.3