diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-07-10 21:40:26 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-07-10 21:40:26 +0000 |
commit | 334f50bebe36198db1bb08037ae5aa0312c84099 (patch) | |
tree | 1127126be5c65776049d675dfea453921e2ed360 /Master/install-tl | |
parent | 007ba261d1a341260d289de6814235375105a859 (diff) |
Show a summary of warnings in final message of the installer.
git-svn-id: svn://tug.org/texlive/trunk@19356 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/Master/install-tl b/Master/install-tl index a8de5124ced..3cc9388cb49 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -19,9 +19,6 @@ # (that, and maybe some others can be done with the waitVariableX # thingy as described in the Perl/Tk book in the chapter that can be # found on the net) (Werner 28.10.08) -# - at the end of the installation after the welcome message if there -# was an error during installation (grep for Error in the logfile) -# then give a warning. (email hh tlbuild 2009-06-03) my $svnrev = '$Revision$'; $svnrev =~ m/: ([0-9]+) /; @@ -95,6 +92,9 @@ use strict; # global list of lines that get logged (see TLUtils.pm::_logit). @::LOGLINES = (); +# global list of warnings +@::WARNLINES = (); + # we play around with the environment, place to keep original my %origenv = (); @@ -592,6 +592,7 @@ exit(0); ################################################################### sub do_installation { + install_warnlines_hook(); if (win32()) { non_admin() if !$vars{'option_w32_multi_user'}; } @@ -638,6 +639,7 @@ sub do_installation { } else { print welcome_paths(); } + print warnings_summary(); } # do_postinst_stuff has to fix up the texmf tree and install some missing @@ -1866,6 +1868,26 @@ EOF # +# remember the warnings issued +sub install_warnlines_hook { + push @::warn_hook, sub { push @::WARNLINES, @_; }; +} + +# +# a summary of warnings if there were any +sub warnings_summary { + return '' unless @::WARNLINES; + my $summary = <<EOF; + + There were some warnings during the installation process. + Here is a summary of warning messages: +EOF + $summary .= ' ' . join(' ', @::WARNLINES) . "\n"; + return $summary; +} + + +# # some helper fucntion sub select_collections { my $varref = shift; |