summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-02-12 12:07:22 +0000
committerNorbert Preining <preining@logic.at>2009-02-12 12:07:22 +0000
commitaab3110f5b194cc3a5d4e083e9fddfa812d14533 (patch)
treee7cc18d9026c8e16164a5d1a4456c0ecc293ccf8
parenta3aa413249aa2c8db8a337d29db57eeb5fd999bc (diff)
fixes for tlmgrgui: - show only critical packages if updates for them are
present in the list of packages to be updated - finish not only on windows, but on all arch after updating critical pkgs - background of critical package in red git-svn-id: svn://tug.org/texlive/trunk@12151 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl2
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/lang/de5
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/lang/en.sample5
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl97
4 files changed, 55 insertions, 54 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl b/Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl
index 6152ea8ece2..3eb679d9abf 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl
@@ -215,7 +215,7 @@ sub do_listframe {
$f->gridRowconfigure(3,-weight => 0);
$f->gridColumnconfigure(1,-weight => 1);
$f->gridColumnconfigure(2,-weight => 1);
- return($f_textf_text);
+ return($f_textf_text, $f_listf_lb);
}
1;
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/lang/de b/Master/texmf/scripts/texlive/tlmgrgui/lang/de
index 2c7c576de3d..2ba88574304 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/lang/de
+++ b/Master/texmf/scripts/texlive/tlmgrgui/lang/de
@@ -77,6 +77,11 @@ updatemaps: Font Datenbank erneuern (updmap-sys)
warningnonetupdate: Keine aktuelleren Pakete gefunden.\n\nAls aktuelle Installationsquelle ist ein lokaler Pfad angegeben.\n\nSoll einmalig aus dem Internet aktualisiert werden,\nbetätigen Sie bitte obige Schaltfläche "Ändern" und wählen dann die Schaltfläche "Voreingestellte Netzwerkquelle"\noder geben Sie eine andere brauchbare Installationsquelle an.\n\nSoll die Installationsquelle dauerhaft geändert werden wählen Sie diese bitte in der Rubrik "Konfiguration".
pleaseclick: Zur Anzeige der Paketinformationen bitte ein Paket im linken Teil des Fensters auswählen.
alluptodate: Alles auf dem neuesten Stand!
+backupdir: Voreingestellter Backup-Ordner
+autobackup: Auto backup Einstellungen
+critupdates: Aktualisierungen des TeX Live Managers stehen bereit.\nInstallation und Aktualisierungen anderer Pakete nur mit der "erzwingen" Option möglich.\nBitte gehen Sie zur Aktualisierungsseite und drücken Sie "Aktualisieren aller Pakete".\nDas Programm beendet sich nach der Aktualisierung.\nDanach können Sie das Programm neu starten für weitere Aktualisierungen.
+critupdw32: Bitte warten Sie etwas nachdem das Programm sich beendet hat damit die Aktualisierungen durchgeführt werden können.
+
# Local Variables:
# coding: utf-8
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/lang/en.sample b/Master/texmf/scripts/texlive/tlmgrgui/lang/en.sample
index ce12a751410..39a66eb5451 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/lang/en.sample
+++ b/Master/texmf/scripts/texlive/tlmgrgui/lang/en.sample
@@ -82,7 +82,10 @@ updatemaps: Update font map database
warningnonetupdate: No updates found.\n\nYour installation is set up to look on the disk for updates.\n\nIf you want to install from the Internet for this one time only, click on the "Change" button above and select "Default Net Location" (or any other network location you know to be working).\n\nIf you want to change it permanently, go to the "Configuration" Tab and change the default installation source.
pleaseclick: Please click on an item on the left for details
alluptodate: Everything uptodate!
-
+backupdir: Default backup directory
+autobackup: Auto backup setting
+critupdates: Updates for the tlmgr are present.\nInstallation and upgrades won't work without being forced.\nPlease go to the update screen and press the "update all" button.\nThe program will terminate after the update.\nThen you can restart the program for further updates.
+critupdw32: Please wait a bit after the program has terminated so that the update can be completed.
# Local Variables:
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl
index 2d6bb4d6b83..c3990acd274 100755
--- a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl
@@ -109,7 +109,8 @@ $TRANS{'en'} = {
# new ones
backupdir => "Default backup directory",
autobackup => "Auto backup setting",
- critupdates => "Updates for the tlmgr are present.\nInstallation and upgrades won't work without being forced.\nPlease select only (if listed) the bin-texlive and texlive.infra package\nand press \"update selected packages\".\nAfter that the Program Window will be closed and the update will be finished automatically."
+ critupdates => "Updates for the tlmgr are present.\nInstallation and upgrades won't work without being forced.\nPlease go to the update screen and press the \"update all\" button.\nThe program will terminate after the update.\nThen you can restart the program for further updates.",
+ critupdw32 => "Please wait a bit after the program has terminated so that the update can be completed."
};
@@ -300,7 +301,7 @@ require ("do_listframe.pl");
# install screen
our $back_f1 = $back->add("install",-label => ___"install");
$screens{"install"} = $back_f1;
-my $install_win = do_listframe($back_f1,
+my ($install_win, $install_lb) = do_listframe($back_f1,
___"addpkg",
\@allpackages,
{ install => { -text => ___"installsel",
@@ -311,7 +312,8 @@ set_text_win($install_win, ___"warningtxt");
# update screen
our $back_up = $back->add("update", -label => ___"update");
$screens{"update"} = $back_up;
-my $update_win = do_listframe($back_up,
+my $critical_updates_present = 0;
+my ($update_win, $update_lb) = do_listframe($back_up,
___"updatepkg",
\@updatepackages,
{ updateall => { -text => ___"updateall",
@@ -327,7 +329,7 @@ set_text_win($update_win, ___"warningtxt");
# remove screen
our $back_f2 = $back->add("remove", -label => ___"remove");
$screens{"remove"} = $back_f2;
-my $remove_win = do_listframe($back_f2,
+my ($remove_win, $remove_lb) = do_listframe($back_f2,
___"rempkg",
\@alllocalpackages,
{ remove => { -text => ___"removesel",
@@ -468,55 +470,29 @@ sub install_selected_packages {
sub update_selected_packages {
if (@_) {
- my $updater_needed = 0;
- if (win32()) {
- # we want to check for those packages which need special treatment
- # and pop up a warning in case it is going to be updated
- my @upgradepkgs;
- if ($_[0] eq "--all") {
- @upgradepkgs = @updatepackages;
- } else {
- @upgradepkgs = @_;
- }
- foreach my $p (@upgradepkgs) {
- if ($p =~ m/$WinSpecialUpdatePackagesRegexp/) {
- $updater_needed = 1;
- last;
- }
- }
- }
my @args = qw/update/;
# argument processing
+ # in case we have critical updates present we do put the list of
+ # critical updates into the argument instead of --all
if ($_[0] eq "--all") {
- $opts{"all"} = 1;
+ if ($critical_updates_present) {
+ push @args, @updatepackages;
+ } else {
+ $opts{"all"} = 1;
+ }
+ # shift away the --all
shift;
}
push @args, @_;
execute_action_gui(@args);
- if (win32() && $updater_needed) {
+ if ($critical_updates_present) {
# terminate here immediately so that we are sure the auto-updater
# is run immediately
# make sure we exit in finish(0)
$::gui_mode = 0;
finish(0);
- # the following code is not reached anymore ...
- my $t = ___"runupdater";
- $t =~ s/TEXROOT/$Master/;
- # TODO TODO TODO TODO
- # here we should terminate the tlmgr and tell the user he should
- # restart afterwards, or create the updater such that the tlmgr
- # is restarted automatically, because the tlmgr(2).bat file
- # does the updates automatically.
- my $sw = $mw->DialogBox(-title => "updater needed", -buttons => [ ___"ok" ]);
- $sw->add("Label", -text => $t)->pack;
- $sw->Show;
- #$mw->Dialog(-title => "updater needed",
- # -text => $t,
- # -buttons => [ ___"ok" ])->Show;
}
reinit_local_tlpdb();
- # TODO TODO TODO
- # we should give a warning window when something didn't work out!!!
}
}
@@ -549,9 +525,18 @@ sub reinit_local_tlpdb {
$mw->Unbusy;
}
+#
+# create_update_list
+# checks for updates and builds up the list @updatepackages which
+# is shown on the update screen
+#
+# if critical packages do have a pending update *only* those packages
+# are shown in the list so that pressing the --all will succeed
sub create_update_list {
my @ret = ();
my @archret = ();
+ my @critical = $localtlpdb->expand_dependencies("-no-collections",
+ $localtlpdb, @TeXLive::TLConfig::CriticalPackagesList);
if (defined($tlmediatlpdb)) {
foreach my $lp ($localtlpdb->list_packages) {
next if ($lp =~ m/00texlive-installation.config/);
@@ -590,25 +575,33 @@ sub create_update_list {
} else {
@ret = ();
}
- @updatepackages = @ret;
- # check for presence of critical packages and if there are updates
- # give a warning window
- my @critical = $localtlpdb->expand_dependencies("-no-collections",
- $localtlpdb, @TeXLive::TLConfig::CriticalPackagesList);
- my $criticalupdate = 0;
- OUTER: for my $p (@updatepackages) {
+ # sort the critical packages out
+ my @critupd = ();
+ OUTER: for my $p (@ret) {
for my $cp (@critical) {
if ($p =~ m/^$cp/) {
- $criticalupdate = 1;
- # terminate the whole checking here
- last OUTER;
+ push @critupd, $p;
+ next OUTER;
}
}
}
- if ($criticalupdate) {
+ if (@critupd) {
+ @updatepackages = @critupd;
+ # set background of critical packages to red
+ for my $i (0..$#updatepackages) {
+ $update_lb->itemconfigure($i, -background => "red",
+ -selectforeground => "red");
+ }
+ $critical_updates_present = 1;
+ } else {
+ @updatepackages = @ret;
+ $critical_updates_present = 0;
+ }
+ if ($critical_updates_present) {
my $sw = $mw->DialogBox(-title => ___"warning", -buttons => [ ___"ok" ]);
- $sw->add("Label", -text => ___"critupdates")->pack(-padx => "3m",
- -pady => "3m");
+ my $t = ___"critupdates";
+ $t .= "\n\n" . ___"critupdw32" if win32();
+ $sw->add("Label", -text => $t)->pack(-padx => "3m", -pady => "3m");
$sw->Show;
}
}