diff options
author | Norbert Preining <preining@logic.at> | 2010-03-12 17:51:33 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2010-03-12 17:51:33 +0000 |
commit | 354c0864a5566b532eba4b6c12244e22d2f9078f (patch) | |
tree | fc5924352bf69e68de4f97877a6535ba23d018f1 /Master/texmf | |
parent | bd52d36a85bdbd6272de1bf2a845bce936003adb (diff) |
tlmgr gui: in the warning window that updates for tlmgr are present
mention only that (at least) N further updates are present after
updating tlmgr itself
git-svn-id: svn://tug.org/texlive/trunk@17442 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rw-r--r-- | Master/texmf/scripts/texlive/tlmgrgui.pl | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgrgui.pl b/Master/texmf/scripts/texlive/tlmgrgui.pl index 20daa064c2c..36b6076445d 100644 --- a/Master/texmf/scripts/texlive/tlmgrgui.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui.pl @@ -1635,14 +1635,30 @@ sub update_list_remote { } } # - # TODO TODO - # - # add to the warning text: NN further updates are available after updating - # telxive.infra.!!!! # if (@critical_updates) { + # add to the warning text if further updates are available + # compute the number of further updates + # we do NOT make a correct computation here like done in the actual + # tlmgr.pl sub action_update, but only count the numbers of packages + # that would be updated (without any forcibly remove/new counting) + my $min_action = 0; + for my $p (keys %Packages) { + next if member($p, @critical); + if (defined($Packages{$p}{'localrevision'}) && + defined($Packages{$p}{'remoterevision'}) && + $Packages{$p}{'localrevision'} < $Packages{$p}{'remoterevision'}) { + $min_action++; + } + } + # + # create the warning dialog + # my $sw = $mw->DialogBox(-title => __("Warning"), -buttons => [ __("Ok") ]); my $t = __("Updates for the tlmgr are present.\nInstallation and upgrades won't work without being forced.\nPlease select \"Update all installed\" button below.\nThe program will terminate after the update.\nThen you can restart the program for further updates."); + if ($min_action) { + $t .= "\n\n" . __("At least %s further updates are available after tlmgr has been updated.", $min_action); + } $t .= "\n\n" . __("Please wait a bit after the program has terminated so that the update can be completed.") if win32(); $sw->add("Label", -text => $t)->pack(-padx => "3m", -pady => "3m"); $sw->Show; |