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/install-tl | 3 ++- Master/tlpkg/TeXLive/TLPDB.pm | 12 +++++++++++- Master/tlpkg/bin/ctan2tds | 1 + Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/bin/tlpkginfo | 9 +++++---- 5 files changed, 20 insertions(+), 7 deletions(-) (limited to 'Master') diff --git a/Master/install-tl b/Master/install-tl index 3e2b808ccd4..8831c97e401 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -724,7 +724,8 @@ sub load_tlpdb { $vars{'option_doc'} = $tlpdb->option_install_docfiles; $vars{'option_src'} = $tlpdb->option_install_srcfiles; $vars{'option_fmt'} = $tlpdb->option_create_formats; - $vars{'option_letter' } = ( $tlpdb->option_paper eq "letter" ? 1 : 0 ); + $vars{'option_letter'} = defined($tlpdb->option_paper) + && ($tlpdb->option_paper eq "letter" ? 1 : 0); $vars{'option_symlinks'} = $tlpdb->option_create_symlinks; $vars{'sys_bin'} = $tlpdb->option_sys_bin; $vars{'sys_man'} = $tlpdb->option_sys_man; 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 { diff --git a/Master/tlpkg/bin/ctan2tds b/Master/tlpkg/bin/ctan2tds index 53322fd25ca..0cc916b6b81 100755 --- a/Master/tlpkg/bin/ctan2tds +++ b/Master/tlpkg/bin/ctan2tds @@ -801,6 +801,7 @@ $standardfmt='latex'; 'iopart-num', 'bibtex', 'kixfont', 'fonts', 'l2picfaq', 'german', + 'l2tabu-it', 'italian', 'l2tabu-spanish', 'spanish', 'latex2man', 'support', 'latexmk', 'support', diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 5263200e950..f93e6920085 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -123,7 +123,7 @@ my @WorkingTLP = qw( jeopardy jknapltx jneurosci jpsj jura juraabbrev jurabib juramisc jurarsp kalender kastrup kerkis kerntest keystroke knuth koma-script kpfonts - l2picfaq l2tabu-english l2tabu-spanish + l2picfaq l2tabu-english l2tabu-it l2tabu-spanish labbook labelcas labels lastpage latex latex2e-help-texinfo latex2man latex-course latex-tds latexmk latexmp diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo index 48784ec4e53..629b5e5f6bf 100755 --- a/Master/tlpkg/bin/tlpkginfo +++ b/Master/tlpkg/bin/tlpkginfo @@ -18,7 +18,7 @@ sub main # erroneous tds files (warn Robin about them) # list format: pkg1|pkg2|etc - $erroneous_tds = "bidi|elsarticle|lcyw|xetexfontinfo"; + $erroneous_tds = "bidi|elsarticle"; # special packages from latex-tds project (used by prepare()) $corelatex_tds_pkgs = "babel|cyrillic|graphics|latex|psnfss|tools"; @@ -130,16 +130,17 @@ sub find_ctan_dir $ctan_dir = "info/impatient/fr" if $me eq "impatient-fr"; $ctan_dir = "info/italian/amsldoc" if $me eq "amsldoc-it"; $ctan_dir = "info/italian/amsthdoc" if $me eq "amsthdoc-it"; + $ctan_dir = "info/l2tabu/italian" if $me eq "l2tabu-it"; + $ctan_dir = "info/lshort/chinese" if $me eq "lshort-chinese"; $ctan_dir = "info/tex-references" if $me eq "tex-refs"; $ctan_dir = "info/translations/vn" if $me eq "ntheorem-vn"; $ctan_dir = "language/armenian/armtex" if $me eq "armenian"; $ctan_dir = "language/basque" if $me eq "hyphen-basque"; $ctan_dir = "language/hungarian/babel" if $me eq "magyar"; - $ctan_dir = "language/hyphenation/elhyphen" if $me eq "hyphen-greek"; $ctan_dir = "language/hyphenation/dehyph" if $me eq "hyphen-german"; - $ctan_dir = "macros/latex/contrib/misc" if $me eq "ltxmisc"; + $ctan_dir = "language/hyphenation/elhyphen" if $me eq "hyphen-greek"; $ctan_dir = "macros/generic" if $me eq "genmisc"; - $ctan_dir = "info/lshort/chinese" if $me eq "lshort-chinese"; + $ctan_dir = "macros/latex/contrib/misc" if $me eq "ltxmisc"; # do last, for sake of subdirs above. $ctan_dir = "language/hyphenation" -- cgit v1.2.3