From 334f50bebe36198db1bb08037ae5aa0312c84099 Mon Sep 17 00:00:00 2001 From: Manuel Pégourié-Gonnard Date: Sat, 10 Jul 2010 21:40:26 +0000 Subject: 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 --- Master/install-tl | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'Master/install-tl') 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 @@ -1864,6 +1866,26 @@ EOF return $welcome; } + +# +# 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 = <